Guys,
When I try to use the version and/or timestamp tags in my class mappings I get XML Validation errors. (See inline xml doc)
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="net.nowehere.impl.dbo.core" auto-import="false">
<class name="AddressImpl" table="std_address_information_cust">
<id name="id" type="integer" column="ai_id">
<generator class="identity" />
</id>
<properties name="ai_address_constraint" unique="true" insert="true" update="true">
<property name="building" type="string" column="ai_building" not-null="true" length="32" />
<property name="street" type="string" column="ai_street" not-null="true" length="32" />
<property name="town" type="string" column="ai_town" not-null="false" length="32" />
<property name="county" type="string" column="ai_county" not-null="false" length="32" />
<property name="city" type="string" column="ai_city" not-null="true" length="64" />
<property name="country" type="string" column="ai_country" not-null="true" length="64" />
<property name="zipCode" type="string" column="ai_zipcode" not-null="true" length="16" />
</properties>
<version name="version" column="ai_version" type="long" />
</class>
</hibernate-mapping>
The error i get from this doc is:
Code:
Content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)"
I followed the hibernate 3 documentation and specifications to the letter can anyone tell me why this validation error is occuring? If i comment out the version line it validates just fine. I am wondering if there is a flaw in the DTD document?
Any help is appreciated!
Thanks,
Nathan Klick