-->
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.  [ 5 posts ] 
Author Message
 Post subject: criteria api : subselect + joins + filter
PostPosted: Thu Feb 07, 2008 8:01 am 
Newbie

Joined: Thu Feb 07, 2008 6:59 am
Posts: 2
Hi all,

I am currently waiting for the next release with will contain following fix:
http://opensource.atlassian.com/project ... se/HHH-952

This would allow subqueries with joins using Criteria API . I was wondering whether a filter would work with the subquery. That would make my work allot easier. Is this tested already?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 08, 2008 4:57 am 
Newbie

Joined: Thu Feb 07, 2008 6:59 am
Posts: 2
Can anyone say whether filters can work with DetachedCriteria?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 13, 2008 2:01 pm 
Expert
Expert

Joined: Sat Jan 17, 2004 2:57 pm
Posts: 329
Location: In the basement in my underwear
bvdaspam:

Filters do work with DetachedCriteria, however, in the current state they are not applied on the subqueries due to the order the parameters are bound.

However, I have a patch submitted under http://opensource.atlassian.com/project ... se/HHH-530 in order to fix the ordering issue and to also pass the filters along with the subqueries.

However, the current state of that patch only works one level deep, i.e. a subquery within a subquery will blow an exception due to the fact that it doesn't seem to have the same access to the session and filters.

I am hoping to have someone else eyeball it in order to get it moving along again but it looks like it's been stalled since Oct 07.

You might want to keep an eye on that one if you plan on using filters and subqueries. I will say that everything else is working fine except the filters in the out of the box config. (3.2.6)

_________________
Some people are like Slinkies - not really good for anything, but you still can't help but smile when you see one tumble down the stairs.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2009 10:16 am 
Newbie

Joined: Mon Jan 26, 2009 12:08 pm
Posts: 2
Location: Denmark
Hi,

I think that your patch would solve my problem outlined here - http://forum.hibernate.org/viewtopic.php?t=994050 - as well.

I donĀ“t know how to build Hibernate Core, and even less how to apply patches, so could anyone please help me?

-- Brian


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2009 4:48 pm 
Expert
Expert

Joined: Sat Jan 17, 2004 2:57 pm
Posts: 329
Location: In the basement in my underwear
I was talking to Flaperman earlier on MSN and I don't think 530 fixes his issue.

On a positive note, it should be fixed in the next official release as Steve made some great progress on the overall parsing.

_________________
Some people are like Slinkies - not really good for anything, but you still can't help but smile when you see one tumble down the stairs.


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