1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
4 - Mapping of the User class and its corresponding Role definition.
5 - User and Role are associated by a one-to-one association on the username User foreign key.
7 - @author Daniel Brunier-Coulin
8 - @copyright OPEN CASCADE 2012
15 <union-subclass name="org.splat.dal.bo.kernel.User" extends="org.splat.dal.bo.kernel.Persistent" table="users" lazy="false">
17 <property name="username" column="username" access="field" />
18 <many-to-one name="role" column="username" insert="false" update="false" unique="true" cascade="save-update" access="field" />
19 <property name="email" column="email" access="field" />
21 <property name="password" column="password" access="field" />
22 <property name="first" column="first" access="field" not-null="true" />
23 <property name="last" column="last" access="field" not-null="true" />
24 <property name="display" column="display" access="field" />
25 <property name="organid" column="organid" access="field" />
30 <class name="org.splat.dal.bo.kernel.Role" table="role" lazy="false">
31 <id name="username" column="username" access="field">
32 <generator class="assigned"/>
34 <property name="role" column="role" access="field" not-null="true" />