-->
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: Let @Formula extend @Column
PostPosted: Wed Aug 02, 2006 12:54 pm 
Newbie

Joined: Wed Nov 02, 2005 5:20 pm
Posts: 9
[b]Hibernate version:[/b]
Core 3.2.CR2, Annotations 3.2.0 CR1, EntityManager 3.2.0 CR1


Hibernate provides a very useful @Formula annotation to let you create a calculated property. You can annotate a property using @Formula instead of @Column. However, you can’t use @Formula where @Column is used in other places. For example, @AttributeOverride’s column attribute accepts @Column. But you can’t assign a @Formula to the column attribute. If @Formula extends @Column, then this problem can be solved.

In addition, we can use <formula> tag inside <many-to-one> tag in hibernate’s mapping file, *.hbm.xml. However, we lose this feature when we move to EJB3.0 annotations even with Hibernate’s @Formula extension. If there is a way to bring this feature back, that will be great.


Top
 Profile  
 
 Post subject: Re: Let @Formula extend @Column
PostPosted: Mon Aug 07, 2006 1:24 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
jifengl wrote:
If @Formula extends @Column, then this problem can be solved.

JDK 5 annotations have no notion of inheritance

_________________
Emmanuel


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.