db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Bengtson" <e...@jpox.org>
Subject unique element
Date Wed, 05 Sep 2007 17:46:50 GMT
Hi,

There is a commentary in the XSD for the unique element saying that either
<column>, <field> or <property> can occur, however there are several cases
we would like to mix these elements. IMO this limitation should not exists.
To illustrate:

Abstract class Person
{
abstract getName();
abstract setName();
String getLastName();
}

<class name="Person">
    <discriminator column="disc"/>
    <property name="name"/>
    <field name="lastName"/>
    <unique>
        <property name="name"/>
        <field name="lastName"/>
        <column name="disc"/>
    </unique>
</class>

Extract from XSD:
------------------
   <xs:element name="unique">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:annotation><xs:documentation>
                    Please note, 
                    the following subelements must not occur more than once:
                    - the choice of columns, fields or properties
                </xs:documentation></xs:annotation>




Mime
View raw message