forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUser.hbm.xml
More file actions
27 lines (27 loc) · 963 Bytes
/
User.hbm.xml
File metadata and controls
27 lines (27 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping package="com.hrl.model">
<class name="User" table="tb_user">
<id name="userId">
<generator class="native" />
</id>
<property name="userName" length="45"/>
<property name="password" length="45"/>
<property name="sex" length="2"/>
<property name="registerTime"/>
<property name="birthday" length="20" />
<property name="email" length="45"/>
<property name="tel" length="20"/>
<property name="isAdmin" />
<set name="articles" inverse="true" order-by="lastUpdateTime desc">
<key column="userId" />
<one-to-many class="Article" />
</set>
<set name="replies" inverse="true" order-by="replyTime desc">
<key column="userId" />
<one-to-many class="Reply" />
</set>
</class>
</hibernate-mapping>