[b]Hibernate version: 2.1.6[/b]
a couple of my team members are having a problem with an HQL query i wrote (backed by an object mapped up by a co-worker). the strange part, to me, is that the query is a find, yet the error from hibernate is
[b]A database error has occurred. Details: Error in ThingDAO.findAll(): net.sf.hibernate.HibernateException: You may not dereference a collection with cascade="all-delete-orphan"[/b]
any ideas/pointers as to why an HQL find complains about something that should only come into play on deletes?
not knowing exactly what [i]all-delete-orphan[/i] means, i looked in the documentation online. i found:
[b]If a transient child is becomes unreferenced by a persistent parent, nothing special happens (the application should explicitly delete the child if necessary) unless cascade="all-delete-orphan", in which case the "orphaned" child is deleted.[/b]
that last bit confuses me - deleted from where? if the child is transient, it doesn't need to be deleted from anywhere, does it?
|