Yeah it's a known issue at the moment.  Will be fixed soon.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wouter
Zoons
Sent: Tuesday, February 15, 2005 7:00 AM
To: [EMAIL PROTECTED]
Subject: [Andromda-devel] hibernate inheritance strategy

I am modeling some subclasses to be used with the Spring cartridge, the
hibernate mapping files generated for those entities are fine, except for
one thing I hink might be an issue:

In the mapping file all subclasses are represented by columns, this is
fine, but the hibernate docs say none of these columns can have a non-null
constraint:
http://www.hibernate.org/hib_docs/reference/en/html_single/#inheritance-stra
tegies

although I have a mapping like this (notice the not-null="true"
attributes): (see XML below)


Is this an issue ?

-- Wouter




<hibernate-mapping default-cascade="none">
    <class name="be.vw.wc.alert.AlertImpl" table="ALERT">
        <id name="id" type="java.lang.Long" column="ID"
unsaved-value="null">
            <generator class="increment">
            </generator>
        </id>
        <discriminator column="class" type="string"/>
        <property name="occurrenceDate" type="java.util.Date">
            <column name="OCCURRENCE_DATE" not-null="true" unique="false"
sql-type="DATETIME"/>
        </property>
        <property name="handledDate" type="java.util.Date">
            <column name="HANDLED_DATE" not-null="true" unique="false"
sql-type="DATETIME"/>
        </property>

        <subclass name="be.vw.wc.alert.InsufficientNewStockImpl"
discriminator-value="InsufficientNewStockImpl">
        <many-to-one name="articleType"
class="be.vw.wc.article.ArticleTypeImpl" outer-join="auto"
not-null="true" >
            <column name="ARTICLE_TYPE_FK"/>
        </many-to-one>

        </subclass>
        <subclass name="be.vw.wc.alert.InsufficientBadgesImpl"
discriminator-value="InsufficientBadgesImpl">
        <many-to-one name="badgeType" class="be.vw.wc.badge.BadgeTypeImpl"
outer-join="auto" not-null="true" >
            <column name="BADGE_TYPE_FK"/>
        </many-to-one>

        </subclass>
        <subclass name="be.vw.wc.alert.InsufficientDotationImpl"
discriminator-value="InsufficientDotationImpl">
        <many-to-one name="person" class="be.vw.wc.person.PersonImpl"
outer-join="auto" not-null="true" >
            <column name="PERSON_FK"/>
        </many-to-one>

        </subclass>
       </class>
</hibernate-mapping>




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to