-->
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: Hibernate Criteria SubQuery case insensitive issue
PostPosted: Fri Nov 26, 2010 5:45 am 
Newbie

Joined: Fri Nov 26, 2010 5:41 am
Posts: 1
Hi

I have some problems with a criteria like the following.
It works fine, but I need the Subqueries.in condition to be case insensitive.

Code:
DetachedCriteria criteria = DetachedCriteria.forClass(Row.class, "row")
        .createAlias("subRows", "s_row").createAlias("s_row.fields", "field");

fields = DetachedCriteria.forClass(SubRowField.class, "field").add(
Property.forName("field.subRow.id").eqProperty(
"s_row.id")).add(Restrictions.eq("field.fieldName", "somename"));

criteria.add(Subqueries.in("somevalue", fields.setProjection(Projections.property("field.value"))))


Maybe is there another way to achieve this result ?

If any of you has an idea it would be great.

Thanks in advance.

L0ck3

P.S. : I can provide the data model structure if needed, but I think the code should be enough.


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.