-->
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: "table per class" in hbm
PostPosted: Mon Oct 24, 2005 1:51 pm 
Beginner
Beginner

Joined: Wed Sep 14, 2005 9:11 am
Posts: 22
Hi,
I want to take the "table per class" approach and am wondering if there's anyway to avoid the need to duplicate the common properties for every class (defined in a parent abstract class) definition in the hbm file. In our case we have a lastUpdateUser column in all of our tables, which won't be handled by a database trigger, because in this case the user is at the application level. I'm just trying to avoid this:

<class type="xxx.Product">
<property name="lastUpdatedBy">
...
</class>

<class type="xxx.Part">
<property name="lastUpdatedBy">
...
</class>

Any ideas?
Thanks,
Ben


Top
 Profile  
 
 Post subject: 2c
PostPosted: Mon Oct 24, 2005 7:06 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
How about?
- XDoclet annotations? http://xdoclet.sourceforge.net/xdoclet/ ... tTask.html

- Hibernate Java5 annotations; http://www.hibernate.org/hib_docs/annot ... e/en/html/

- externanal XML entity definitions; http://xml.oreilly.com/news/learningxml_0101.html

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


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.