There is an error message in Architect Log window. What does this error message actually means?
2016-04-28 18:28:22,537  FATAL CZ.Advantages.Asap.DA.ObjectPersistence.Providers.AsapPersistenceProvider [(null)] <(null)> - Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
at System.Data.DataSet.set_EnforceConstraints(Boolean value)
2016-04-28 18:28:22,599  FATAL CZ.Advantages.Asap.DA.ObjectPersistence.Providers.AsapPersistenceProvider [(null)] <(null)> - Error: ForeignKeyConstraint FK_SchemaItem requires the child key values (274b25eb-2d81-4e7c-aaed-f8138733bd25) to exist in the parent table.; Table:SchemaItem
- DataItems:59a697ef-a233-4496-89c0-65f940151737; DataStructureEntity; BusinessPartnerBankAccount; CZ.Advantages.Asap.Schema.EntityModel.DataStructureEntity; False; ; ; ; ; ; ; ; ; ; ; ; 0; 0; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; True; False; False; False; False; False; False; f36193e2-8690-4b3b-8d41-cb1c264bb69e; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; 03e67dd1-542d-464b-aacd-93467da36fc6; 274b25eb-2d81-4e7c-aaed-f8138733bd25;
It seems that an entity BusinessPartnerBankAccount in a model has a reference to a missing parent (probably refParentItemId) which has a value 274b25eb-2d81-4e7c-aaed-f8138733bd25.
The reason could be that the referenced (parent) entity is in a package that isn’t loaded. Or the model is broken.
Try to load your top-most package and search for id 274b25eb-2d81-4e7c-aaed-f8138733bd25. The causing element with wrong reference should be 59a697ef-a233-4496-89c0-65f940151737.
I loaded top package and tried to search for 274b25eb-2d81-4e7c-aaed-f8138733bd25, but 0 results found. When I searched for 59a697ef-a233-4496-89c0-65f940151737, architect shows absolutely nothing - no message box with with information, how many results were found.
I found the row with Id 59a6… in model database - table SchemaItem and refParentItemId is 274b…, but didn’t find row with Id 274b…
It looks, that the Architect didn’t delete all the tree from the datastructure during delete action. How can this happen? Is it safe to delete this row in model database to be consistent?
What can happen is that if a model element is extended in another package and you delete it, the extended children do not get deleted. This is a missing functionality as for now. You need to go first to other packages (or top-level package) if you feel that the element could be extended.
As the elements do not have their parents they will never get used anyway so technically it is safe to delete these.