<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<!-- Note: the runtime version of this file is bundled into isomorphic_examples.jar -->
<hibernate-mapping>
    <class name="com.isomorphic.examples.server.flattenedBeans.FlatUser" table="flattenedBeans_flatUser" >
        <id name="userId">
            <generator class="native"/>
        </id>
        <property name="firstName" type="string" />
        <property name="surname" type="string" />
        <property name="email" type="string" />

        <many-to-one name="address" 
        			 column="addressId"
        			 unique="true"
                     cascade="all"
                     lazy="false"
                     fetch="join" />

        </class>
</hibernate-mapping>