root/lang/java/misc/ssh-blank/src/main/resources/org/coderepos/entity/Emp.hbm.xml @ 32621

Revision 32621, 1.2 kB (checked in by rikeda, 5 years ago)

MGRのマッピング追加。

  • Property svn:mime-type set to text/plain
Line 
1<?xml version="1.0"?>
2<!DOCTYPE hibernate-mapping PUBLIC
3        "-//Hibernate/Hibernate Mapping DTD//EN"
4        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
5<hibernate-mapping package="org.coderepos.entity">
6    <class name="Emp" table="EMP" lazy="false">
7        <id name="id" column="ID" type="integer"/>
8        <version name="version" column="VERSION" type="integer"/>
9        <property name="empNo" column="EMP_NO" type="integer"/>
10        <property name="empName" column="EMP_NAME"/>
11        <property name="mgrId" column="MGR_ID" type="integer"/>
12        <property name="hiredate" column="HIREDATE" type="date"/>
13        <property name="sal" column="SAL" type="big_decimal"/>
14        <property name="deptId" column="DEPT_ID" type="integer"/>
15        <set name="empSet" order-by="id"
16                inverse="true" fetch="join" lazy="false">
17            <key column="MGR_ID"/>
18            <one-to-many class="Emp"/>
19        </set>
20        <many-to-one name="mgr" class="Emp" column="MGR_ID"
21            insert="false" update="false" fetch="join" lazy="false"/>
22        <many-to-one name="dept" class="Dept" column="DEPT_ID"
23            insert="false" update="false" fetch="join" lazy="false"/>
24    </class>
25</hibernate-mapping>
Note: See TracBrowser for help on using the browser.