-->
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: Not provide annotation for <properties>?
PostPosted: Tue Jun 27, 2006 1:45 pm 
Newbie

Joined: Tue Oct 28, 2003 10:33 am
Posts: 9
I am just wondering why Hibernate Annotations doesn't provide the same feature as <properties> & <formula> elements from Hibernate?

i.e.
<class name="Department"
table="DEPARTMENT">
....
<one-to-one name="manager"
property-ref="managerReference">
<formula>'Manager'</formula>
<formula>ID</formula>

</one-to-one>
</class>

<class name="Employee"
table="EMPLOYEE">

<properties name="managerReference">
<property name="title"/>

<many-to-one name="department"
class="Department"
column="DEPARTMENT_ID"/>
</properties>



As on working on a legacy database, it is very useful.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 09, 2006 7:16 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I am actually looking for a good syntax to support that

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 10, 2006 11:56 pm 
Newbie

Joined: Tue Oct 28, 2003 10:33 am
Posts: 9
emmanuel wrote:
I am actually looking for a good syntax to support that


EXCELLENT!
As it is very powerful feature which is *STRONG* asked to be implemented in the final release of Hibernate Annotation.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 16, 2006 12:47 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
When I mean looking for, I really mean proposals. I don't have a good one for now.
Not sure it is strongly asked, there were no opened JIRA issue for it. I've oepned it, vote for it
http://opensource.atlassian.com/projects/hibernate/browse/ANN-394

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 17, 2006 11:20 am 
Newbie

Joined: Tue Oct 28, 2003 10:33 am
Posts: 9
emmanuel wrote:
When I mean looking for, I really mean proposals. I don't have a good one for now.
Not sure it is strongly asked, there were no opened JIRA issue for it. I've oepned it, vote for it
http://opensource.atlassian.com/projects/hibernate/browse/ANN-394


As of a long-historic application, i.e. banking systems, it is definately impossible to update a legacy data model, and the design of the model is always crap (everty table has a composite key, and there is no any foreign key at all... sometimes you can't believe it! but it is always over there).

It is obviously not enough if we are only limited within the annotations from the standard EJB3 spec. But fortunately, we find Hibernate core's <properties> and <formula> features are very powerful because they can help us a lot to deal with these cases. So I think please consider providing the same features of Hibernate core on Annotations, so that it can be used not only on the new system, but also on the legacy system. IMO, there are a lot of big applications expecially from finacial , banking, government industries which data model are always irregular and crap, the kind of requirement is very important if you hope your product can be used in these situations very well.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 17, 2006 11:21 am 
Newbie

Joined: Tue Oct 28, 2003 10:33 am
Posts: 9
emmanuel wrote:
When I mean looking for, I really mean proposals. I don't have a good one for now.
Not sure it is strongly asked, there were no opened JIRA issue for it. I've oepned it, vote for it
http://opensource.atlassian.com/projects/hibernate/browse/ANN-394


As of a long-historic application, i.e. banking systems, it is definately impossible to update a legacy data model, and the design of the model is always crap (everty table has a composite key, and there is no any foreign key at all... sometimes you can't believe it! but it is always over there).

It is obviously not enough if we are only limited within the annotations from the standard EJB3 spec. But fortunately, we find Hibernate core's <properties> and <formula> features are very powerful because they can help us a lot to deal with these cases. So I think please consider providing the same features of Hibernate core on Annotations, so that it can be used not only on the new system, but also on the legacy system. IMO, there are a lot of big applications expecially from finacial , banking, government industries which data model are always irregular and crap, the kind of requirement is very important if you hope your product can be used in these situations very well.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 17, 2006 11:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you guys did notice emmanuel saying that he were looking for suggestion on how to add this, right ? :) We want it as much as you guys, but annotations are not really built for this kind of declaration.

In the meanwhile do realize that you can (to a certain degree) have both hbm.xml and annotations in the same project allowing to have parts of both worlds.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 17, 2006 12:39 pm 
Newbie

Joined: Tue Oct 28, 2003 10:33 am
Posts: 9
Yep, currenly I think it is only way we can do.
Thanks anyway.


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.