Skip to content
Snippets Groups Projects
Commit 8fb815b1 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

change default behaviour to add missing provider segments on commit

parent 1b52c247
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,16 @@ namespace armarx::armem::base
}
else
{
throw armem::error::MissingEntry("provider segment", update.entityID.providerSegmentName, getLevelName(), this->getKeyString());
if (_addMissingProviderSegmentDuringUpdate)
{
// Add the missing provider segment (with this core segment's type).
ProviderSegmentT& provSeg = addProviderSegment(update.entityID.providerSegmentName);
return provSeg.update(update);
}
else
{
throw armem::error::MissingEntry("provider segment", update.entityID.providerSegmentName, getLevelName(), this->getKeyString());
}
}
}
......@@ -230,13 +239,20 @@ namespace armarx::armem::base
{
Base::_copySelf(other);
other.aronType() = _aronType;
other._addMissingProviderSegmentDuringUpdate = _addMissingProviderSegmentDuringUpdate;
}
virtual void _copySelfEmpty(DerivedT& other) const override
{
Base::_copySelfEmpty(other);
other.aronType() = _aronType;
other._addMissingProviderSegmentDuringUpdate = _addMissingProviderSegmentDuringUpdate;
}
private:
bool _addMissingProviderSegmentDuringUpdate = true;
};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment