-->
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.  [ 4 posts ] 
Author Message
 Post subject: Mapping of default columns of each table
PostPosted: Tue Feb 07, 2006 9:08 am 
Newbie

Joined: Thu Oct 14, 2004 11:53 am
Posts: 5
Hi,

i am using the table-per-concrete-class approach. each table contains four columns to log creation/change informations

Code:
<property name="createTime" column="CRTDAT"/>
<property name="createUser" column="CRTUSR"/>
<property name="changeTime" column="CHGDAT"/>
<property name="changeUser" column="CHGUSR"/>


i wonder if it is possible to extract these mappings, so not each class must contain these four lines.

Tickerduck


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 10, 2006 1:06 am 
Regular
Regular

Joined: Tue Dec 14, 2004 5:21 am
Posts: 104
Location: india
i think its a matter of simple inheritemce . why dont u put these common fields on top of your inheritence hierarchy :)

_________________
sHeRiN
thanks for your ratings ...... :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 10, 2006 3:46 am 
Newbie

Joined: Thu Oct 14, 2004 11:53 am
Posts: 5
hi, no dont think so. the common attributes (id, time,..) are stored in a superclass but this superclass is not persited. maybe this approach is wrong..

tigerduck


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 10, 2006 4:13 am 
Regular
Regular

Joined: Tue Dec 14, 2004 5:21 am
Posts: 104
Location: india
as far as i know , table per concrete class makes some data redundant . im not sure if there any solution that way .
why not go for a table per subclass

_________________
sHeRiN
thanks for your ratings ...... :)


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