Automatically deleting objects from a to-many relationship when removed?

Faizel Dakri <[email protected]>
Newsgroups gmane.comp.java.cayenne.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.