-->
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: Formula and joined columns
PostPosted: Mon Sep 11, 2006 8:35 am 
Regular
Regular

Joined: Fri Aug 18, 2006 2:40 pm
Posts: 51
Location: Metz, France
Hibernate version:3.1.1

Name and version of the database you are using:Oracle9

Problem:
If I wanted to order my results by CONCAT( COL1, COL2 ),
with COL1 and COL2 being columns of root table, formula would do it fine.

But my Criteria uses two left outer join and I would like to use columns of the joined tables in my concat.

Code:
formula=" concat ( fo1_.nom , concat ( pe2_.lastname, official_name ) )"


Currently it works, but the aliases fo1_ and pe2_ are used to access joined tables and they may change in the future generated sql
(whereas they are hard coded in the xml mapping)


Is it a safer way to access joined tables column from inside a formula ?

_________________
Denis
Don't forget to rate ... thanks.


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.