-->
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: How to apply and restriction on alias
PostPosted: Mon Feb 15, 2010 10:25 am 
Newbie

Joined: Mon Dec 25, 2006 4:59 am
Posts: 15
Hi guys

I need help on creating a detached criteria which will use alias (with inner join) only if the aliased object is not null.

in criteria i am using LEFT_OUTER_JOIN, but this argument is not available in detached criteria. Is there any way, besides to do it in detached criteria ?
Code:
        criteria.createAlias("element", "alias", JoinFragment.LEFT_OUTER_JOIN);
        Criterion criterion1= Restrictions.isNull("element");
        Criterion criterion2= Restrictions.eq("alias.something", false);
        criteria.add(Restrictions.or(criterion1, criterion2));



thanks


Top
 Profile  
 
 Post subject: Re: How to apply and restriction on alias
PostPosted: Tue Feb 16, 2010 4:20 am 
Newbie

Joined: Mon Dec 25, 2006 4:59 am
Posts: 15
well i have found this bug

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

so i will upgrade my hibernate to a newer version from 3.1 to 3.3


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.