-->
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: Use property in Projections and in a Criterion gives error
PostPosted: Fri May 14, 2010 7:33 am 
Beginner
Beginner

Joined: Tue Aug 26, 2008 4:24 pm
Posts: 29
I am doing something like the next:
....
Criterion criterio2 = Restrictions.ilike("artiNombre", query, MatchMode.START);
ProjectionList proList = Projections.projectionList();
proList.add(Projections.property("artiNombre"),"artiNombre");
criterio.setProjection(proList);
criterio.setResultTransformer(Transformers.aliasToBean(Sene1Articulo.class));
......

It generates:

select
this_.ARTI_NOMBRE as y2_
from
sene1_articulos this_
where
and lower(y2_) like ?

And Oracle says: ORA-00904: "Y2_": identifier not valid.
I think its because Im using an alias in the ProjectionList for "artiNombre" and Iam using a condition for "artiNombre" too. How can I put a property in a Projection and use the same property like a condition in the select? is not possible for the alias?
Thanks


Top
 Profile  
 
 Post subject: Re: Use property in Projections and in a Criterion gives error
PostPosted: Thu May 20, 2010 4:02 pm 
Expert
Expert

Joined: Sat Jan 17, 2004 2:57 pm
Posts: 329
Location: In the basement in my underwear
There is a JIRA issue raised on this http://opensource.atlassian.com/project ... e/HHH-5020

_________________
Some people are like Slinkies - not really good for anything, but you still can't help but smile when you see one tumble down the stairs.


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.