-->
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: firstResult/maxResults specified with collection fetch
PostPosted: Sun Feb 10, 2013 8:16 am 
Newbie

Joined: Mon Jul 30, 2012 10:17 am
Posts: 3
Hi,
Hibernate prints the following warning when executing a query:
Quote:
11:42:08,488 WARN [org.hibernate.hql.internal.ast.QueryTranslatorImpl] (http-localhost-127.0.0.1-8080-3) HHH000104: firstResult/maxResults specified with collection fetch; applying in memory!


This warning should appear if you do fetch joins and specify a max result at the same time. But I'm not doing that, so I don't know why this warning would appear.
My query:
Quote:
SELECT DISTINCT e FROM Member e LEFT JOIN FETCH e.billableItems LEFT JOIN FETCH e.type WHERE e.leaveDate IS NULL


The query being executed:
Quote:
SELECT member0_.id AS id162_0_,
billableit1_.id AS id164_1_,
membertype2_.id AS id163_2_,
member0_.birthdate AS birthdate162_0_,
member0_.city AS city162_0_,
member0_.comment AS comment162_0_,
member0_.email AS email162_0_,
member0_.entrydate AS entryDate162_0_,
member0_.firstname AS firstname162_0_,
member0_.lastname AS lastname162_0_,
member0_.leavedate AS leaveDate162_0_,
member0_.phone AS phone162_0_,
member0_.street AS street162_0_,
member0_.type_id AS type13_162_0_,
member0_.zipcode AS zipCode162_0_,
billableit1_.fee AS fee164_1_,
billableit1_.member_id AS member7_164_1_,
billableit1_.paymentstatus AS paymentS4_164_1_,
billableit1_.quarternumber AS quarterN5_164_1_,
billableit1_.year AS year164_1_,
billableit1_.dtype AS DTYPE164_1_,
billableit1_.member_id AS member7_162_0__,
billableit1_.id AS id0__,
membertype2_.feeratio AS feeRatio163_2_,
membertype2_.name AS name163_2_
FROM member member0_
LEFT OUTER JOIN billableitem billableit1_
ON member0_.id = billableit1_.member_id
LEFT OUTER JOIN membertype membertype2_
ON member0_.type_id = membertype2_.id
WHERE member0_.id =?


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.