The rules I suggested are what you want. They are also consistent with
foreign key deletion rules used by many RDBMSs.
Please note that with nullify, only the object that was deleted should
be yanked out of the context. Otherwise, the only thing that is
happening is that the other end of the relationship is being set to
NULL. Moreover, this is only happening inside of Cayenne, so even if
your DB ultimately disallows NULL values in those columns, you won't
trip over validation until you try to commit all of those objects. This
is because it is perfectly legal to have an "inconsistent" object sit
around in memory as you set values on it.
-- Kevin-----Original Message----- From: Jan Lendholt [mailto:jlendhol..otmail.com] Sent: Monday, November 19, 2007 3:12 PM To: use..ayenne.apache.org Subject: RE: Deletion of obejcts
Well, what would be the right rule for me?
I want - if booking recordset is deleted - to delete everything in extras. If a recordset in extras is deleted, I simply want the row to be deleted. That works perfectly - but the object graph seems not get updated :/
This archive was generated by hypermail 2.0.0 : Mon Nov 19 2007 - 15:37:55 EST