-->
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: Hibernate Criteria concatenate columns
PostPosted: Tue Nov 08, 2011 9:57 am 
Newbie

Joined: Sat Jun 09, 2007 12:29 pm
Posts: 19
Is it possible to do something like this with Hibernate criteria?

select (a.name + ' ' + a.surname) as longname from persons a

_________________
http://www.objectverse.com
http://www.alcyone.si
http://blog.alcyone.si


Top
 Profile  
 
 Post subject: Re: Hibernate Criteria concatenate columns
PostPosted: Sun Feb 03, 2013 2:17 pm 
Newbie

Joined: Wed Feb 21, 2007 1:48 pm
Posts: 8
In case someone else is still searching for this, I posted a solution on my blog, which involved creating a new Criterion:
http://whaticode.com/2013/02/01/hibernate-criteria-concatenate-fields-in-like-and-ilike-operators/

I hope it helps you.


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.