| 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
 
 
 |