-->
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.  [ 1 post ] 
Author Message
 Post subject: Generic class ?
PostPosted: Mon Oct 09, 2006 10:52 am 
Newbie

Joined: Fri Oct 06, 2006 9:33 am
Posts: 2
Hello,

I would like to use Hibernate. Currently, I use dods to map my java and my DB. But, we wish to evolve our platform.

Is it possible to create a "generic" class "linked" with several tables.

A strategy "Table per concrete class" (documentation section 9.1.5.) could correspond to our waiting. But in this case, we are required to create the corresponding subclasses ?

For example:

<class name="Entry" abstract="true">
<id name="id" type="long" column="ENTRY_ID">
<generator class="sequence"/>
</id>
<property name="description" column="DESCRIPTION"/>
<property name="description" column="CONTEXT"/>
...
<union-subclass name="EntryFra" table="ENTRY_FRA">
</union-subclass>
<union-subclass name="EntryEng" table="ENTRY_ENG">
</union-subclass>
<union-subclass name="EntryIta" table="ENTRY_ITA">
</union-subclass>
</class>

Is it possible to create only the class Entry without creating the classes EntryFra, EntryEng et EntryIta ? and load easily Entry objects into tables ENTRY_FRA, ENTRY_ENG and ENTRY_ITA !

Thx,
Fbrunet


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.