-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: filter and collection was unreferenced
PostPosted: Fri Jan 20, 2006 11:48 am 
Newbie

Joined: Thu Oct 09, 2003 6:57 am
Posts: 17
Location: France
Hello,

I have The collection was unreferenced

my code :
Code:
query = session.getNamedQuery(ShipmentDAO.QUERY_ALL_SHIPMENT);
query.setFirstResult(startRecord);
query.setMaxResults(endRecord);
List results = query.list();

query = session.createFilter(results,"order by date asc");
return query.list();


my name query :
Code:
@NamedQuery(
        name = ShipmentDAO.QUERY_ALL_SHIPMENT,
        queryString="from Shipment shipment left join fetch shipment.pieces"
    )


the session.createFilter line of code throws the exception.
Is it a bug ? or something that I don't understand

Hibernate version: 3.1

Full stack trace of any exception that occurs:
The collection was unreferenced
org.hibernate.QueryException: The collection was unreferenced
at org.hibernate.impl.SessionImpl.getFilterQueryPlan(SessionImpl.java:1369)
at org.hibernate.impl.SessionImpl.createFilter(SessionImpl.java:1191)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:292)
at $Proxy16.createFilter(Unknown Source)
at com.tigatech.dhl.dao.hibernate.ShipmentDAOHibernate.getAllShipments(ShipmentDAOHibernate.java:78)
at com.tigatech.dhl.test.junit.ShipmentTest.testGetShipmentList(ShipmentTest.java:117)
at com.tigatech.dhl.test.junit.HibernateTest.runTest(HibernateTest.java:48)





thank you


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.