Apache JDO Project - unique element

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > September 2007 > unique element





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author unique element
Erik Bengtson

2007-09-05, 1:12 pm

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>




Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com