-->
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.  [ 2 posts ] 
Author Message
 Post subject: Query.iterate() regression in Hibernate 3.1.1
PostPosted: Wed Jan 25, 2006 4:20 pm 
Beginner
Beginner

Joined: Wed Sep 28, 2005 5:30 pm
Posts: 25
JDBC driver:MySQL Connector/J 3.1.12
Hibernate version: 3.1.0 or 3.1.1

Source code sniplet:
Code:
HibernateHelper hibernateHelper = HibernateHelper.getInstance();
        Session session = hibernateHelper.getSession();
        Query getImages = session.createQuery("from " +
          ServerOriginalImage.class.getName() + " as image where " +
          "image.theme=:theme and image not in " +
          "(select gallery.imageCacheEntry.originalImage from " +
          ServerImageGalleryEntry.class.getName() + " as gallery)");
        getImages.setEntity("theme", theme);
        Iterator i = getImages.iterate();
        i.next(); // works fine
        Query getCanonicalInstance = session.createQuery("from " +
          ServerImageCacheManager.class.getName());
        ServerImageCacheManager result = (ServerImageCacheManager) getCanonicalInstance.uniqueResult();
        i.next(); // fails with "Operation not allowed after ResultSet closed"


For an unknown reason, the 2nd query is causing the ResultSet of the 1st query to close but this code works fine with Hibernate 3.0.5 so I'm thinking it might be a bug. Should I file a JIRA issue?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 11:37 pm 
Beginner
Beginner

Joined: Wed Sep 28, 2005 5:30 pm
Posts: 25
Final chance before I file a JIRA issue. Is this a bug or not?


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

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.