<?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.itjob.dao.model">
    <class name="Role" table="TRole">
        <id name="trId" column="tr_id">
            <generator class="native"/>
        </id>
        <property name="roleName" column="role_name" type="java.lang.String" not-null="true" length="50" />
        <property name="description" column="description" type="java.lang.String" length="255" />
        <property name="createTime" column="create_time" type="java.util.Date" not-null="true" />
		<set name="rights" table="TRoleRightRelation" lazy="false" cascade="save-update">
			<key>
				<column name="role_id" not-null="true"/>
			</key>
			<many-to-many class="TRight" column="right_id"/>
	    </set>
    </class>
</hibernate-mapping>
