Removing Objects: Reference validation error from

I want to remove an object in a maintable e.g. Customer with 1:n associations in a several other sub tables e.g. Addresses.

All referenced records in the sub tables should be deleted as well.

In the manual is written, that this will be done automatically.


But when I try to remove initiated by a NavigatorButton control, it works only if there are no referenced addresses in the sub tables. Otherwise I get a ‘Reference conflict error in subtable’ from the database.

If delete the records manually with a SQL Statement before, then I get a Exception EAssociationReferencesTransientObject with the message: 'Association references a transient object'


This looks like I did not understand something…


Your help is greatly appreciated again!

Hello, have you include TCascadeType.Remove in the ManyValuedAssociation attribute?

You must indicate Aurelius which associated objects should be deleted together with the main object. Check the documentation for ManyValuedAssociation attribute: