Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate 2: net.sf.hibernate.HibernateException: You may not dereference a collection with cascade=

 
John Landon
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting net.sf.hibernate.HibernateException: You may not dereference a collection with cascade="all-delete-orphan"
All I am doing is running a select query:

"from Book book item where book.read= false order by item.writtenDate desc"

It does not make any sense...

Please help.

Thanks,
John.

PS.
Here is the full stack trace
1.1 net.sf.hibernate.HibernateException: You may not dereference a collection with cascade="all-delete-orphan"net.sf.hibernate.HibernateException: You may not dereference a collection with cascade="all-delete-orphan"
at net.sf.hibernate.impl.SessionImpl.updateUnreachableCollection(SessionImpl.java:2951)
at net.sf.hibernate.impl.SessionImpl.flushCollections(SessionImpl.java:2816)
Exception in thread "main"
at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2282)

at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1815)
1 com.booker.exceptions.BookerException: Error quering
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1578)
1.1 net.sf.hibernate.HibernateException: You may not dereference a collection with cascade="all-delete-orphan"net.sf.hibernate.HibernateException: You may not dereference a collection with cascade="all-delete-orphan"
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
at net.sf.hibernate.impl.SessionImpl.updateUnreachableCollection(SessionImpl.java:2951)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
at net.sf.hibernate.impl.SessionImpl.flushCollections(SessionImpl.java:2816)
:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic