if (!aFeature)
continue;
- myStorage->update(aFeature);
+ if (!myStorage->update(aFeature)) // the entity is not created, so it is a copy in "multi" constraint, force its creation
+ myStorage->update(aFeature, myGroupID, true);
theEntities.push_back(myStorage->entity(aFeature));
myFeatures.insert(aFeature);
for (int i = 0; i < myNumberOfCopies && anObjIt != anObjectList.end(); ++i, ++anObjIt) {
for (; anIt != anAttrList.end(); ++anIt) {
aPoints.clear();
aCopyIt = anObjIt;
- for (int i = 0; i < aNbCopies; ++i, ++aCopyIt) {
+ for (int i = 0; i < aNbCopies && aCopyIt != aFullList.end(); ++i, ++aCopyIt) {
FeaturePtr aFeature = ModelAPI_Feature::feature(*aCopyIt);
aPoints.insert(aFeature->attribute(*anIt));
}