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

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"/>
        <property name="name"/>
        <field name="lastName"/>
        <column name="disc"/>

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

View raw message