You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Marcin Skladaniec <ma...@ish.com.au> on 2007/03/20 02:43:45 UTC

deleting a record and validation

Hi

I use remote persistence, and I have a dozen objects in the context,  
and I would like to try to check if one of them can be deleted.
Can I just call recordToBeDeleted.validateForDelete() before I call  
context.deleteRecord( recordToBeDeleted ) ?
 From my understanding context.deleteRecord will propagate through  
the relationships which are set to cascade, deleting related records  
as well, and therefore possibly altering the validation result. Or  
does cascading happens on server during the commit ?

Marcin