|
From: <one...@us...> - 2002-12-26 03:35:10
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv22091/hibernate
Modified Files:
hibernate-mapping-1.1.dtd hibernate-mapping.dtd
Log Message:
support for multi-column unique constraints via unique-key attribute
Index: hibernate-mapping-1.1.dtd
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/hibernate-mapping-1.1.dtd,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** hibernate-mapping-1.1.dtd 21 Nov 2002 07:51:17 -0000 1.13
--- hibernate-mapping-1.1.dtd 26 Dec 2002 03:35:07 -0000 1.14
***************
*** 370,373 ****
--- 370,374 ----
<!ATTLIST column not-null (true|false) #IMPLIED> <!-- default: false (except for id properties) -->
<!ATTLIST column unique (true|false) #IMPLIED> <!-- default: false (except for id properties) -->
+ <!ATTLIST column unique-key CDATA #IMPLIED> <!-- default: no unique key -->
<!ATTLIST column sql-type CDATA #IMPLIED> <!-- override default column type for hibernate type -->
<!ATTLIST column index CDATA #IMPLIED>
Index: hibernate-mapping.dtd
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/hibernate-mapping.dtd,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** hibernate-mapping.dtd 19 Nov 2002 15:28:05 -0000 1.82
--- hibernate-mapping.dtd 26 Dec 2002 03:35:07 -0000 1.83
***************
*** 1,349 ****
! <?xml version='1.0' encoding='utf-8'?>
!
! <!-- Hibernate Mapping DTD.
!
! <!DOCTYPE hibernate-mapping PUBLIC
! "-//Hibernate/Hibernate Mapping DTD//EN"
! "http://hibernate.sourceforge.net/hibernate-mapping.dtd">
!
! An instance of this XML document may contain mappings for an arbitrary
! number of classes. The class mappings may contain associations to classes
! mapped in the same document or in another document. No class may be
! mapped more than once. Each document may also contains mappings for an
! arbitrary number of toplevel collections. Toplevel collection roles may
! be referenced by later class and collection mappings in the same document.
! (They must be declared before they are used.)
!
! -->
!
! <!-- The document root. -->
!
! <!ELEMENT hibernate-mapping (
! (map|set|list|bag|array|primitive-array)*,
! class*,
! query*
! )>
! <!ATTLIST hibernate-mapping schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST hibernate-mapping default-cascade CDATA #IMPLIED> <!-- none|save/update|all, default: none -->
!
! <!-- Root of an entity class hierarchy. Entities have their own tables. -->
!
! <!ELEMENT class (
! jcs-cache?,
! (id|composite-id),
! discriminator?,
! (version|timestamp)?,
! (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*,
! subclass*,
! cache?
! )>
! <!ATTLIST class name CDATA #REQUIRED>
! <!ATTLIST class table CDATA #IMPLIED> <!-- default: unqualified classname -->
! <!ATTLIST class schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST class proxy CDATA #IMPLIED> <!-- default: no proxy interface -->
! <!ATTLIST class mutable CDATA #IMPLIED> <!-- default: true -->
! <!ATTLIST class persister CDATA #IMPLIED> <!-- default: cirrus.hibernate.persister.EntityPersister -->
! <!ATTLIST class polymorphism CDATA #IMPLIED> <!-- implicit | explicit, default: implicit -->
! <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none -->
!
! <!-- Declares the id type, column and generation algorithm for an entity class.
! If a name attribut is given, the id is exposed to the application through the
! named property of the class. If not, the id is only exposed to the application
! through Session.getID()-->
!
! <!ELEMENT id (column?, generator)>
! <!ATTLIST id name CDATA #IMPLIED>
! <!ATTLIST id column CDATA #IMPLIED>
! <!ATTLIST id type CDATA #IMPLIED>
! <!ATTLIST id length CDATA #IMPLIED>
! <!ATTLIST id unsaved-value CDATA #IMPLIED> <!-- any|none|null|"value", default: any -->
!
! <!-- A composite key may be modelled by a java class with a property for each
! key column. The class must implement java.io.Serializable and reimplement equals()
! and hashCode(). -->
!
! <!ELEMENT composite-id (property+)>
! <!ATTLIST composite-id class CDATA #IMPLIED>
! <!ATTLIST composite-id name CDATA #IMPLIED>
! <!ATTLIST composite-id unsaved-value CDATA #IMPLIED> <!-- any|none|null, default: any -->
!
! <!-- Polymorphic data requires a column holding a class discriminator value. This
! value is not directly exposed to the application. -->
!
! <!ELEMENT discriminator (column?)>
! <!ATTLIST discriminator column CDATA #IMPLIED> <!-- default: "class"|none -->
! <!ATTLIST discriminator type CDATA #IMPLIED> <!-- default: string -->
! <!ATTLIST discriminator length CDATA #IMPLIED> <!-- default: 100 -->
!
! <!-- Versioned data requires a column holding a version number. This is exposed to the
! application through a property of the Java class. -->
!
! <!ELEMENT version EMPTY>
! <!ATTLIST version name CDATA #REQUIRED>
! <!ATTLIST version column CDATA #IMPLIED>
! <!ATTLIST version type CDATA #IMPLIED> <!-- default: integer -->
!
! <!ELEMENT timestamp EMPTY>
! <!ATTLIST timestamp name CDATA #REQUIRED>
! <!ATTLIST timestamp column CDATA #IMPLIED>
!
! <!-- Subclass declarations are nested beneath the root class declaration to achieve
! polymorphic persistence. -->
!
! <!ELEMENT subclass (
! (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*,
! subclass*
! )>
! <!ATTLIST subclass name CDATA #REQUIRED>
! <!ATTLIST subclass proxy CDATA #IMPLIED> <!-- default: no proxy interface -->
!
! <!ATTLIST subclass discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none -->
!
! <!-- Property of an entity class or component, component-element, composite-id, etc.
! JavaBeans style properties are mapped to table columns. -->
!
! <!ELEMENT property (column*)>
! <!ATTLIST property name CDATA #REQUIRED>
! <!ATTLIST property type CDATA #IMPLIED>
! <!ATTLIST property column CDATA #IMPLIED>
! <!ATTLIST property length CDATA #IMPLIED>
! <!ATTLIST property not-null CDATA #IMPLIED>
! <!ATTLIST property unique CDATA #IMPLIED>
!
! <!-- Declares an association between two entities (Or from a component, component element,
! etc. to an entity). -->
!
! <!ELEMENT many-to-one (column*)>
! <!ATTLIST many-to-one name CDATA #REQUIRED>
! <!ATTLIST many-to-one class CDATA #IMPLIED>
! <!ATTLIST many-to-one column CDATA #IMPLIED>
! <!ATTLIST many-to-one length CDATA #IMPLIED> <!-- DEPRECATED -->
! <!ATTLIST many-to-one not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-one unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-one cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST many-to-one outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
!
! <!-- Declares a one-to-one association between two entities (Or from a component,
! component element, etc. to an entity). -->
!
! <!ELEMENT one-to-one EMPTY>
! <!ATTLIST one-to-one name CDATA #REQUIRED>
! <!ATTLIST one-to-one class CDATA #IMPLIED>
! <!ATTLIST one-to-one cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST one-to-one outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
! <!ATTLIST one-to-one constrained CDATA #IMPLIED> <!-- true|false, default: false -->
!
! <!-- Declared a property that holds instances of a toplevel collection role. -->
!
! <!ELEMENT collection (column*)>
! <!ATTLIST collection name CDATA #REQUIRED>
! <!ATTLIST collection role CDATA #IMPLIED>
! <!ATTLIST collection column CDATA #IMPLIED>
! <!ATTLIST collection length CDATA #IMPLIED>
! <!ATTLIST collection not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST collection unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST collection cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
!
! <!-- A component is a user-defined class, persisted along with its containing entity
! to the table of the entity class. JavaBeans style properties of the component are
! mapped to columns of the table of the containing entity. A null component reference
! is mapped to null values in all columns and vice versa. Components do not support
! shared reference semantics. -->
!
! <!ELEMENT component (
! parent?,
! (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*
! )>
! <!ATTLIST component class CDATA #IMPLIED>
! <!ATTLIST component name CDATA #REQUIRED>
!
! <!-- The parent element maps a property of the component class as a pointer back to
! the owning entity. -->
!
! <!ELEMENT parent EMPTY>
! <!ATTLIST parent name CDATA #REQUIRED>
!
! <!-- Collection roles declared directly beneath the root element have their own key
! and may be referenced by many collection or subcollection tags. Collection declarations
! nested inside a class declaration indicate a foreign key relationship from the
! collection table to the enclosing class. For toplevel collections, the name of
! the role may be an arbitrary string. For nested collections, it must be the name
! of the property containing the collection.
!
! Note that the cascade attribute is ignored for toplevel collections. -->
!
! <!ELEMENT map (
! jcs-cache?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST map role CDATA #REQUIRED>
! <!ATTLIST map table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST map schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST map lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST map sort CDATA #IMPLIED> <!-- unsorted|natural, default: unsorted -->
! <!ATTLIST map cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST map order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT set (
! jcs-cache?,
! key,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST set role CDATA #REQUIRED>
! <!ATTLIST set table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST set schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST set lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST set sort CDATA #IMPLIED> <!-- unsorted|natural, default: unsorted -->
! <!ATTLIST set readonly CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST set cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST set order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT bag (
! jcs-cache?,
! key,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST bag role CDATA #REQUIRED>
! <!ATTLIST bag table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST bag schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST bag lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST bag readonly CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST bag cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST bag order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT list (
! jcs-cache?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST list role CDATA #REQUIRED>
! <!ATTLIST list table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST list schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST list lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST list cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
!
! <!ELEMENT array (
! jcs-cache?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST array role CDATA #REQUIRED>
! <!ATTLIST array table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST array schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST array element-class CDATA #IMPLIED>
! <!ATTLIST array cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
!
! <!ELEMENT primitive-array (jcs-cache?, key, index, element)>
! <!ATTLIST primitive-array role CDATA #REQUIRED>
! <!ATTLIST primitive-array table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST primitive-array schema CDATA #IMPLIED> <!-- default: none -->
!
! <!-- Declares the element type of a collection of basic type -->
!
! <!ELEMENT element (column*)>
! <!ATTLIST element column CDATA #IMPLIED>
! <!ATTLIST element type CDATA #REQUIRED>
! <!ATTLIST element length CDATA #IMPLIED>
! <!ATTLIST element not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST element unique CDATA #IMPLIED> <!-- true|false, default: false -->
!
! <!-- One to many association. This tag declares the entity-class
! element type of a collection and specifies a one-to-many relational model -->
!
! <!ELEMENT one-to-many EMPTY>
! <!ATTLIST one-to-many class CDATA #REQUIRED>
! <!-- No column declaration attributes required in this case. The primary
! key column of the associated class is already mapped elsewhere.-->
!
! <!-- Many to many association. This tag declares the entity-class
! element type of a collection and specifies a many-to-many relational model -->
!
! <!ELEMENT many-to-many (column*)>
! <!ATTLIST many-to-many class CDATA #REQUIRED>
! <!ATTLIST many-to-many column CDATA #IMPLIED>
! <!ATTLIST many-to-many length CDATA #IMPLIED> <!-- DEPRECATED -->
! <!ATTLIST many-to-many not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-many outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
! <!-- unique makes no sense here since it would mean a one-to-many -->
!
! <!-- This tag declares that the element type of a collection is a named
! toplevel collection role. -->
!
! <!ELEMENT subcollection (column*)>
! <!ATTLIST subcollection column CDATA #IMPLIED>
! <!ATTLIST subcollection role CDATA #REQUIRED>
! <!ATTLIST subcollection length CDATA #IMPLIED>
! <!ATTLIST subcollection not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST subcollection unique CDATA #IMPLIED> <!-- true|false, default: false -->
!
! <!-- A composite element allows a collection to hold instances of an arbitrary
! class, without the requirement of joining to an entity table. Composite elements
! have component semantics - no shared references and ad hoc null value semantics.
! Composite elements may not hold nested collections. -->
!
! <!ELEMENT composite-element (
! (property|many-to-one|collection|nested-composite-element)*
! )>
! <!ATTLIST composite-element class CDATA #REQUIRED>
!
! <!ELEMENT nested-composite-element (
! (property|many-to-one|collection|nested-composite-element)*
! )>
! <!ATTLIST nested-composite-element class CDATA #REQUIRED>
! <!ATTLIST nested-composite-element name CDATA #REQUIRED>
!
! <!-- Declares the type, column name (and, in the case of toplevel collections,
! an id generation strategy) for the key of a collection table. These keys are
! never exposed to the application. For toplevel collections, Hibernate makes
! no guarantee of key stability of a particular collection instance. -->
!
! <!ELEMENT key (generator?, column*)>
! <!ATTLIST key column CDATA #IMPLIED>
! <!ATTLIST key type CDATA #IMPLIED>
! <!ATTLIST key length CDATA #IMPLIED>
!
! <!-- Declares the type and column mapping for a collection index (array or
! list index, or key of a map). -->
!
! <!ELEMENT index (column?)>
! <!ATTLIST index column CDATA #REQUIRED>
! <!ATTLIST index type CDATA #IMPLIED>
! <!ATTLIST index length CDATA #IMPLIED>
!
! <!-- Generators generate unique identifiers. The class attribute specifies a Java class
! implementing an id generation algorithm. -->
!
! <!ELEMENT generator (param*)>
! <!ATTLIST generator class CDATA #REQUIRED>
! <!ELEMENT param (#PCDATA)>
!
! <!-- The column element is an alternative to column attributes and required for
! mapping associations to classes with composite ids. -->
!
! <!ELEMENT column EMPTY>
! <!ATTLIST column name CDATA #REQUIRED>
! <!ATTLIST column length CDATA #IMPLIED> <!-- default: 255 -->
! <!ATTLIST column not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST column unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST column sql-type CDATA #IMPLIED> <!-- override default column type for hibernate type -->
! <!ATTLIST column index CDATA #IMPLIED>
!
! <!-- The jcs-cache element enables caching of an entity class. -->
! <!ELEMENT jcs-cache EMPTY>
! <!ATTLIST jcs-cache usage CDATA #REQUIRED> <!-- read-only | read-write -->
!
! <!-- The cache element enables caching of an entity class.
! semi-deprecated - use a jcs-cache. -->
! <!ELEMENT cache EMPTY>
! <!ATTLIST cache timeout CDATA #IMPLIED> <!-- default: never expire -->
! <!ATTLIST cache impl-class CDATA #IMPLIED> <!-- default: hashbelt -->
! <!ATTLIST cache type CDATA #REQUIRED> <!-- readonly | readwrite -->
!
! <!-- The query element declares a named Hibernate query string -->
!
! <!ELEMENT query (#PCDATA)>
! <!ATTLIST query name CDATA #REQUIRED>
--- 1,350 ----
! <?xml version='1.0' encoding='utf-8'?>
!
! <!-- Hibernate Mapping DTD.
!
! <!DOCTYPE hibernate-mapping PUBLIC
! "-//Hibernate/Hibernate Mapping DTD//EN"
! "http://hibernate.sourceforge.net/hibernate-mapping.dtd">
!
! An instance of this XML document may contain mappings for an arbitrary
! number of classes. The class mappings may contain associations to classes
! mapped in the same document or in another document. No class may be
! mapped more than once. Each document may also contains mappings for an
! arbitrary number of toplevel collections. Toplevel collection roles may
! be referenced by later class and collection mappings in the same document.
! (They must be declared before they are used.)
!
! -->
!
! <!-- The document root. -->
!
! <!ELEMENT hibernate-mapping (
! (map|set|list|bag|array|primitive-array)*,
! class*,
! query*
! )>
! <!ATTLIST hibernate-mapping schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST hibernate-mapping default-cascade CDATA #IMPLIED> <!-- none|save/update|all, default: none -->
!
! <!-- Root of an entity class hierarchy. Entities have their own tables. -->
!
! <!ELEMENT class (
! jcs-cache?,
! (id|composite-id),
! discriminator?,
! (version|timestamp)?,
! (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*,
! subclass*,
! cache?
! )>
! <!ATTLIST class name CDATA #REQUIRED>
! <!ATTLIST class table CDATA #IMPLIED> <!-- default: unqualified classname -->
! <!ATTLIST class schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST class proxy CDATA #IMPLIED> <!-- default: no proxy interface -->
! <!ATTLIST class mutable CDATA #IMPLIED> <!-- default: true -->
! <!ATTLIST class persister CDATA #IMPLIED> <!-- default: cirrus.hibernate.persister.EntityPersister -->
! <!ATTLIST class polymorphism CDATA #IMPLIED> <!-- implicit | explicit, default: implicit -->
! <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none -->
!
! <!-- Declares the id type, column and generation algorithm for an entity class.
! If a name attribut is given, the id is exposed to the application through the
! named property of the class. If not, the id is only exposed to the application
! through Session.getID()-->
!
! <!ELEMENT id (column?, generator)>
! <!ATTLIST id name CDATA #IMPLIED>
! <!ATTLIST id column CDATA #IMPLIED>
! <!ATTLIST id type CDATA #IMPLIED>
! <!ATTLIST id length CDATA #IMPLIED>
! <!ATTLIST id unsaved-value CDATA #IMPLIED> <!-- any|none|null|"value", default: any -->
!
! <!-- A composite key may be modelled by a java class with a property for each
! key column. The class must implement java.io.Serializable and reimplement equals()
! and hashCode(). -->
!
! <!ELEMENT composite-id (property+)>
! <!ATTLIST composite-id class CDATA #IMPLIED>
! <!ATTLIST composite-id name CDATA #IMPLIED>
! <!ATTLIST composite-id unsaved-value CDATA #IMPLIED> <!-- any|none|null, default: any -->
!
! <!-- Polymorphic data requires a column holding a class discriminator value. This
! value is not directly exposed to the application. -->
!
! <!ELEMENT discriminator (column?)>
! <!ATTLIST discriminator column CDATA #IMPLIED> <!-- default: "class"|none -->
! <!ATTLIST discriminator type CDATA #IMPLIED> <!-- default: string -->
! <!ATTLIST discriminator length CDATA #IMPLIED> <!-- default: 100 -->
!
! <!-- Versioned data requires a column holding a version number. This is exposed to the
! application through a property of the Java class. -->
!
! <!ELEMENT version EMPTY>
! <!ATTLIST version name CDATA #REQUIRED>
! <!ATTLIST version column CDATA #IMPLIED>
! <!ATTLIST version type CDATA #IMPLIED> <!-- default: integer -->
!
! <!ELEMENT timestamp EMPTY>
! <!ATTLIST timestamp name CDATA #REQUIRED>
! <!ATTLIST timestamp column CDATA #IMPLIED>
!
! <!-- Subclass declarations are nested beneath the root class declaration to achieve
! polymorphic persistence. -->
!
! <!ELEMENT subclass (
! (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*,
! subclass*
! )>
! <!ATTLIST subclass name CDATA #REQUIRED>
! <!ATTLIST subclass proxy CDATA #IMPLIED> <!-- default: no proxy interface -->
!
! <!ATTLIST subclass discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none -->
!
! <!-- Property of an entity class or component, component-element, composite-id, etc.
! JavaBeans style properties are mapped to table columns. -->
!
! <!ELEMENT property (column*)>
! <!ATTLIST property name CDATA #REQUIRED>
! <!ATTLIST property type CDATA #IMPLIED>
! <!ATTLIST property column CDATA #IMPLIED>
! <!ATTLIST property length CDATA #IMPLIED>
! <!ATTLIST property not-null CDATA #IMPLIED>
! <!ATTLIST property unique CDATA #IMPLIED>
!
! <!-- Declares an association between two entities (Or from a component, component element,
! etc. to an entity). -->
!
! <!ELEMENT many-to-one (column*)>
! <!ATTLIST many-to-one name CDATA #REQUIRED>
! <!ATTLIST many-to-one class CDATA #IMPLIED>
! <!ATTLIST many-to-one column CDATA #IMPLIED>
! <!ATTLIST many-to-one length CDATA #IMPLIED> <!-- DEPRECATED -->
! <!ATTLIST many-to-one not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-one unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-one cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST many-to-one outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
!
! <!-- Declares a one-to-one association between two entities (Or from a component,
! component element, etc. to an entity). -->
!
! <!ELEMENT one-to-one EMPTY>
! <!ATTLIST one-to-one name CDATA #REQUIRED>
! <!ATTLIST one-to-one class CDATA #IMPLIED>
! <!ATTLIST one-to-one cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST one-to-one outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
! <!ATTLIST one-to-one constrained CDATA #IMPLIED> <!-- true|false, default: false -->
!
! <!-- Declared a property that holds instances of a toplevel collection role. -->
!
! <!ELEMENT collection (column*)>
! <!ATTLIST collection name CDATA #REQUIRED>
! <!ATTLIST collection role CDATA #IMPLIED>
! <!ATTLIST collection column CDATA #IMPLIED>
! <!ATTLIST collection length CDATA #IMPLIED>
! <!ATTLIST collection not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST collection unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST collection cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
!
! <!-- A component is a user-defined class, persisted along with its containing entity
! to the table of the entity class. JavaBeans style properties of the component are
! mapped to columns of the table of the containing entity. A null component reference
! is mapped to null values in all columns and vice versa. Components do not support
! shared reference semantics. -->
!
! <!ELEMENT component (
! parent?,
! (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*
! )>
! <!ATTLIST component class CDATA #IMPLIED>
! <!ATTLIST component name CDATA #REQUIRED>
!
! <!-- The parent element maps a property of the component class as a pointer back to
! the owning entity. -->
!
! <!ELEMENT parent EMPTY>
! <!ATTLIST parent name CDATA #REQUIRED>
!
! <!-- Collection roles declared directly beneath the root element have their own key
! and may be referenced by many collection or subcollection tags. Collection declarations
! nested inside a class declaration indicate a foreign key relationship from the
! collection table to the enclosing class. For toplevel collections, the name of
! the role may be an arbitrary string. For nested collections, it must be the name
! of the property containing the collection.
!
! Note that the cascade attribute is ignored for toplevel collections. -->
!
! <!ELEMENT map (
! jcs-cache?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST map role CDATA #REQUIRED>
! <!ATTLIST map table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST map schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST map lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST map sort CDATA #IMPLIED> <!-- unsorted|natural, default: unsorted -->
! <!ATTLIST map cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST map order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT set (
! jcs-cache?,
! key,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST set role CDATA #REQUIRED>
! <!ATTLIST set table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST set schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST set lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST set sort CDATA #IMPLIED> <!-- unsorted|natural, default: unsorted -->
! <!ATTLIST set readonly CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST set cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST set order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT bag (
! jcs-cache?,
! key,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST bag role CDATA #REQUIRED>
! <!ATTLIST bag table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST bag schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST bag lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST bag readonly CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST bag cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST bag order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT list (
! jcs-cache?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST list role CDATA #REQUIRED>
! <!ATTLIST list table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST list schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST list lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST list cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
!
! <!ELEMENT array (
! jcs-cache?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST array role CDATA #REQUIRED>
! <!ATTLIST array table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST array schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST array element-class CDATA #IMPLIED>
! <!ATTLIST array cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
!
! <!ELEMENT primitive-array (jcs-cache?, key, index, element)>
! <!ATTLIST primitive-array role CDATA #REQUIRED>
! <!ATTLIST primitive-array table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST primitive-array schema CDATA #IMPLIED> <!-- default: none -->
!
! <!-- Declares the element type of a collection of basic type -->
!
! <!ELEMENT element (column*)>
! <!ATTLIST element column CDATA #IMPLIED>
! <!ATTLIST element type CDATA #REQUIRED>
! <!ATTLIST element length CDATA #IMPLIED>
! <!ATTLIST element not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST element unique CDATA #IMPLIED> <!-- true|false, default: false -->
!
! <!-- One to many association. This tag declares the entity-class
! element type of a collection and specifies a one-to-many relational model -->
!
! <!ELEMENT one-to-many EMPTY>
! <!ATTLIST one-to-many class CDATA #REQUIRED>
! <!-- No column declaration attributes required in this case. The primary
! key column of the associated class is already mapped elsewhere.-->
!
! <!-- Many to many association. This tag declares the entity-class
! element type of a collection and specifies a many-to-many relational model -->
!
! <!ELEMENT many-to-many (column*)>
! <!ATTLIST many-to-many class CDATA #REQUIRED>
! <!ATTLIST many-to-many column CDATA #IMPLIED>
! <!ATTLIST many-to-many length CDATA #IMPLIED> <!-- DEPRECATED -->
! <!ATTLIST many-to-many not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-many outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
! <!-- unique makes no sense here since it would mean a one-to-many -->
!
! <!-- This tag declares that the element type of a collection is a named
! toplevel collection role. -->
!
! <!ELEMENT subcollection (column*)>
! <!ATTLIST subcollection column CDATA #IMPLIED>
! <!ATTLIST subcollection role CDATA #REQUIRED>
! <!ATTLIST subcollection length CDATA #IMPLIED>
! <!ATTLIST subcollection not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST subcollection unique CDATA #IMPLIED> <!-- true|false, default: false -->
!
! <!-- A composite element allows a collection to hold instances of an arbitrary
! class, without the requirement of joining to an entity table. Composite elements
! have component semantics - no shared references and ad hoc null value semantics.
! Composite elements may not hold nested collections. -->
!
! <!ELEMENT composite-element (
! (property|many-to-one|collection|nested-composite-element)*
! )>
! <!ATTLIST composite-element class CDATA #REQUIRED>
!
! <!ELEMENT nested-composite-element (
! (property|many-to-one|collection|nested-composite-element)*
! )>
! <!ATTLIST nested-composite-element class CDATA #REQUIRED>
! <!ATTLIST nested-composite-element name CDATA #REQUIRED>
!
! <!-- Declares the type, column name (and, in the case of toplevel collections,
! an id generation strategy) for the key of a collection table. These keys are
! never exposed to the application. For toplevel collections, Hibernate makes
! no guarantee of key stability of a particular collection instance. -->
!
! <!ELEMENT key (generator?, column*)>
! <!ATTLIST key column CDATA #IMPLIED>
! <!ATTLIST key type CDATA #IMPLIED>
! <!ATTLIST key length CDATA #IMPLIED>
!
! <!-- Declares the type and column mapping for a collection index (array or
! list index, or key of a map). -->
!
! <!ELEMENT index (column?)>
! <!ATTLIST index column CDATA #REQUIRED>
! <!ATTLIST index type CDATA #IMPLIED>
! <!ATTLIST index length CDATA #IMPLIED>
!
! <!-- Generators generate unique identifiers. The class attribute specifies a Java class
! implementing an id generation algorithm. -->
!
! <!ELEMENT generator (param*)>
! <!ATTLIST generator class CDATA #REQUIRED>
! <!ELEMENT param (#PCDATA)>
!
! <!-- The column element is an alternative to column attributes and required for
! mapping associations to classes with composite ids. -->
!
! <!ELEMENT column EMPTY>
! <!ATTLIST column name CDATA #REQUIRED>
! <!ATTLIST column length CDATA #IMPLIED> <!-- default: 255 -->
! <!ATTLIST column not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST column unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST column unique-key CDATA #IMPLIED> <!-- default: no unique key -->
! <!ATTLIST column sql-type CDATA #IMPLIED> <!-- override default column type for hibernate type -->
! <!ATTLIST column index CDATA #IMPLIED>
!
! <!-- The jcs-cache element enables caching of an entity class. -->
! <!ELEMENT jcs-cache EMPTY>
! <!ATTLIST jcs-cache usage CDATA #REQUIRED> <!-- read-only | read-write -->
!
! <!-- The cache element enables caching of an entity class.
! semi-deprecated - use a jcs-cache. -->
! <!ELEMENT cache EMPTY>
! <!ATTLIST cache timeout CDATA #IMPLIED> <!-- default: never expire -->
! <!ATTLIST cache impl-class CDATA #IMPLIED> <!-- default: hashbelt -->
! <!ATTLIST cache type CDATA #REQUIRED> <!-- readonly | readwrite -->
!
! <!-- The query element declares a named Hibernate query string -->
!
! <!ELEMENT query (#PCDATA)>
! <!ATTLIST query name CDATA #REQUIRED>
|