• 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: 239
  • 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)
:
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!