My hibernate mapping file is like follow:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class
name="dbdemo.Users"
table="Users"
dynamic-update="false"
>
<id
name="userID"
column="LogonID"
type="string"
unsaved-value="any"
>
<generator class="assigned">
</generator>
</id>
<property
name="emailAddress"
type="string"
update="true"
insert="true"
column="EmailAddress"
/>
<property
name="lastLogon"
type="date"
update="true"
insert="true"
column="LastLogon"
/>
<property
name="password"
type="string"
update="true"
insert="true"
column="Password"
/>
<property
name="userName"
type="string"
update="true"
insert="true"
column="Name"
/>
<set
name="contacts"
table="Contacts"
lazy="false"
inverse="false"
cascade="all"
sort="unsorted"
>
<key
column="User_ID"
/>
<one-to-many
class="dbdemo.Contact"
/>
</set>
<set
name="books"
table="Book_User_Link"
lazy="false"
inverse="false"
cascade="all"
sort="unsorted"
>
<key
column="UserID"
/>
<many-to-many
class="dbdemo.Book"
column="BookID"
outer-join="auto"
/>
</set>
<one-to-one
name="address"
class="dbdemo.Address"
cascade="none"
outer-join="auto"
constrained="false"
/>
<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-User.xml
containing the additional properties and place it in your merge dir.
-->
</class>
</hibernate-mapping>
The reference of DTD is
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd.
If I turn offline, The java.net.unknowHostException:hibernate.sourceforge.net would be thrown.
Is the xml checking necessary?