-->
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: Return FIXED value: Select FIXED_VALUE, column from table
PostPosted: Tue Jan 22, 2013 5:06 am 
Newbie

Joined: Wed Nov 07, 2012 1:28 pm
Posts: 5
Hello, good afternoon.

I'm trying to return a fixed value using JPA criteria API but I can't do it.

This is my native SQL clause: "SELECT 1,NAME FROM TEACHER" but JPA returns "undefined alias".

What I'm doing wrong?. Is possible get this in JPA?.

I have found literal method in CriteriaBuilder API, but I don't know how it could help me.

Thanks for help.

English is not my mother tongue, sorry, I'm trying my best.


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.