-->
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.  [ 8 posts ] 
Author Message
 Post subject: Annotation for formula mapping
PostPosted: Sun May 01, 2005 6:00 am 
Newbie

Joined: Thu Dec 16, 2004 7:50 am
Posts: 11
I would like to make something like calculated field - in hibernate2 it was done by formula mapping. I am trying to find annotation for this in hibernate3, but it seems there is nothing like that. Any ideas ?


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 01, 2005 8:34 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
it's in our todo list but not with a high priority, check jira.

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2005 7:25 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Vote for it. We're open minded (up to a limit ;-) )

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 03, 2005 7:54 am 
Newbie

Joined: Thu Dec 16, 2004 7:50 am
Posts: 11
I have assigned my vote to this in JIRA. Actually I need this because I would like to migrate my current project from Hibernate2 to Hibernate3. If I just upgrade the jar file and overwrite the imports from net.sf.hiberante to org.hibernate and also the DOCTYPEs in the mapping *.hbm.xml files I encounter the problem, that ID properties are not generated in *.java files if I use the code generator from hibernate tools. So I have decided to use the annotations and after few minutes of excitement by this new feature I had to deal with this formula problem. Also the orderby clause seems to be unsupported right now.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 03, 2005 12:40 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I think those 2 features are quite easy to implement, please contribute if you can :-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 04, 2005 5:33 am 
Newbie

Joined: Thu Dec 16, 2004 7:50 am
Posts: 11
I am not very experienced with Java - I am actually happy if I can make my first Tomcat-Hibernate-Spring-JSP merry-go-round (project) keep spining. But just in case if I would like to code this features on my own and put the result back into hibernate core where should I get the info like how should the annotation class look like, in which package it should be located, etc...?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 04, 2005 12:35 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
get HibernateExt from CVS
check the metadata subproject
annotations are in org.hibernate.annotations
and the binding tools are in org.hibernate.cfg and org.hibernate.cfg.annotations

The annotation will look like @Formula(sql="case ...")

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 10:00 am 
Newbie

Joined: Thu Dec 16, 2004 7:50 am
Posts: 11
I have got the source ... I will look at it...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.