cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Menard" <kmen...@servprise.com>
Subject RE: Deletion of obejcts
Date Mon, 19 Nov 2007 20:37:16 GMT
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:jlendholt@hotmail.com] 
Sent: Monday, November 19, 2007 3:12 PM
To: user@cayenne.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 :/

Mime
View raw message