I've just ran into a problem (well for me anyway). I have a class called Department which has a collection of TradingAccounts(). This all persists OK in the database.
My problem occurs when I delete one of the items from this collection. Although my Collection of TradingAccounts no longer has a reference to it, it remains in the database!. I've read on the web (URL below) that this is the desired functionality for Hibernate, and I can see uses for this, however I don't want this functionality so it there a way to remove child objects from the database?
I also read that it is possible to use a cascade="all-delete-orphan" option to delete any child objects, however I treid this and it failed during the generate stage of my build process as this option is not specified in the DTD.
Any advice would be much appreciated,
Paul
URL:
http://www.hibernate.org/hib_docs/refer ... child.html