-->
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: Where to place comment elements in <union subclass?>
PostPosted: Mon Dec 03, 2007 12:50 pm 
Newbie

Joined: Mon Dec 03, 2007 12:44 pm
Posts: 1
I am trying to include some comments in the generated SQL tables using Hibernate.
Comments for tables and columns are properly generated, except in the case of tables declared with union-subclass.

In the example below, the comment for in the "table of fathers" is not generated. Any ideas what I am doing wrong?

ionathan


Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="interfaces" default-cascade="all">
   <class name="interfaces.IParent" abstract="true" lazy="false">
      <comment>
         Parent is someone with a name and an id... (This is
         generated)
      </comment>
      <id column="ID" name="ID">
         <generator class="increment" />
      </id>
      <property name="name">
         <column name="name">
            <comment>Parental name (generated)</comment>
         </column>
      </property>
   </class>
   <union-subclass name="interfaces.Father"
      extends="interfaces.IParent" table="Table_fathers">
                <!-- Is this the right place for the comment?-->
      <comment>
         Here comes the comment for the fathers' table (NOT
         GENERATED)
      </comment>

      <property name="fatherP">
         <column name="fatherp">
            <comment>
               A custom property of the father (Comment
               generated)
            </comment>
         </column>
      </property>
   </union-subclass>
</hibernate-mapping>


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.