-->
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: Problem with abstract="true" and the generated tab
PostPosted: Thu Oct 19, 2006 10:45 am 
Newbie

Joined: Thu Jul 13, 2006 4:54 am
Posts: 1
Hi,

when I specify abstract=true for the mapping of my class, Hibernate generates a table named like the class.

But, I want to have one table per concrete class (i.e no table for the root abstract class). How could I achieve this ?

Here are some informations :

Hibernate version:3.2.0.cr4

Mapping documents:
<class name="UserProfile" abstract="true">
<id name="id" type="string" column="ID">
<generator class="uuid" />
</id>
<property name="name" />
</class>
<union-subclass name="CfUserProfile" extends="com.tennaxia.t3.common.bo.UserProfile"
table="CF_USER_PROFILES">
<property name="cf" />
</union-subclass>

then just instanciate the session factory with hbm2ddl.auto enabled and go to see the structure of the db

Name and version of the database you are using: mySQL 5.0.18

If you go to see the db (with phpMyAdmin for example), then you will see that there is a table named UserProfile, which is incorrect because I'm using the Table per concrete class with union strategy (so no properties will be stored into the root table).

Am I missing something ?

regards,
chris


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.