Is there a facility in Cayenne to automatically delete an object when it is 
removed from an “owning” object’s to-many relationship (and not added to 
another owning object)? 

I’m migrating a project from EOF to Cayenne. In the EOF world, there was the 
concept of a relationship owning its destination, meaning that removing a 
destination object from that relationship in the source object would also cause 
that destination object to be deleted from the database on commit without 
having to explicitly call deleteObject() on it (provided it wasn’t subsequently 
added to another source object). This automatic deletion would happen during 
saveChanges() on the editing context.

Maybe it’s just too obvious and I haven’t been able to recognize it, but I have 
not been able to find anything similar in Cayenne. Is there such a feature? 

Thanks,

F

-- 
Faizel Dakri


Reply via email to