-->
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: Errors in named queries after updating from 2.1.0 to 2.1.2
PostPosted: Thu Apr 01, 2010 8:55 am 
Beginner
Beginner

Joined: Thu Sep 17, 2009 8:53 am
Posts: 20
Hi there!
I've just updated my application to use 2.1.2 instead of 2.1.0
I now happen to get lots of errors in named queries, which worked perfectly before.
Only those queries containing more than one "inner join fetch" are affected.
Example (simplified names):

select p
from Person as p
inner join fetch p.dog as d
inner join fetch p.dog.shack as s

same for

select p
from Person as p
inner join fetch p.dog as d
inner join fetch d.shack as s

When I disable query checking on start-up I get following exception on execution:
Query specified join fetching, but the owner of the fetched association was not present in the select list ...

following example works fine:

select p
from Person as p
inner join fetch p.dog as d


I don't get why this is. And even worse:

select p
from Person p
inner join fetch p.dog d

does not work as well! Even though, I simply removed those "as", which I understand should be optional anyway!

Anyone else experiencing similar problems, or any other suggestions?
Thanks a lot!


Top
 Profile  
 
 Post subject: Re: Errors in named queries after updating from 2.1.0 to 2.1.2
PostPosted: Tue Apr 06, 2010 4:01 am 
Beginner
Beginner

Joined: Thu Sep 17, 2009 8:53 am
Posts: 20
A small update on my problem:
Removing all "fetch" statements makes the queries work.
This is no solution though, as performance is dismal - lazy loading thousands of objects...


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.