-->
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.  [ 3 posts ] 
Author Message
 Post subject: lazy="extra" returns incorrect size() with where=&
PostPosted: Mon Jun 25, 2007 12:06 am 
Newbie

Joined: Fri Jun 10, 2005 12:22 am
Posts: 6
Location: Melbourne/Sydney
Hibernate version:
3.2.4
Mapping documents:
....
<set name="topics" inverse="true" cascade="all" optimistic-lock="false" batch-size="64" lazy="extra"
where="deleted='N'">
<cache usage="read-write"/>
<key column="GROUP_ID" on-delete="noaction"/>
<one-to-many class="Topic" />
</set>
....

Name and version of the database you are using:
MySQL 5.0
The generated SQL (show_sql=true):


Hibernate is returning an incorrect collection size when I enabled 'lazy="extra"'. The following query 'select count(*) from groups' is executed when performing a size() on the collection which does not include the where clause included in the mapping document. Retrieving the collection works as expected.

This looks like a bug to me, but I'm a little surprised that I would be the first to hit the problem.

Thanks

Craig Baker


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 25, 2007 1:55 am 
Expert
Expert

Joined: Tue Jan 30, 2007 12:45 am
Posts: 283
Location: India
Hi crbaker,

Might be the proble with jar.Take latest.For more reference have a look on.

http://opensource.atlassian.com/project ... se/HHH-783

http://opensource.atlassian.com/project ... e/HHH-1776

_________________
Dharmendra Pandey


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 25, 2007 2:20 am 
Newbie

Joined: Fri Jun 10, 2005 12:22 am
Posts: 6
Location: Melbourne/Sydney
dharmendra.pandey wrote:
Hi crbaker,

Might be the proble with jar.Take latest.For more reference have a look on.

http://opensource.atlassian.com/project ... se/HHH-783

http://opensource.atlassian.com/project ... e/HHH-1776


By problem with jar, I presume you mean I should be running the latest version of hibernate, which I am.

Appreciate the references to JIRA issues, however that don't appear to address the issue.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.