-->
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: mongodb ignoreCase query using JPQL
PostPosted: Wed Nov 23, 2016 5:31 am 
Newbie

Joined: Wed Mar 18, 2015 11:38 am
Posts: 10
Hi,

How do i query for a entity field with ignoreCase using JPQL language.

Could anyone share an example please?

Thanks and regards!

Javier


Top
 Profile  
 
 Post subject: Re: mongodb ignoreCase query using JPQL
PostPosted: Wed Nov 23, 2016 9:28 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
I don't think there is a way to do this in Hibernate OGM using JPQL.

Usually you could try something like:

Code:
from Book b where UPPER(b.titile) in (:titles)


At the moment, Hibernate OGM does not support functions in the queries though, so this won't work.

I can think of two possible solutions:

    1) Native queries, em.createNativeQueries(...)
    2) You can add an additional column where the value is already in uppercase (o lowercase)

If your use case allows it, you might also consider Hibernate Search.


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.