<?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>
 <!-- Role实体对象 -->
    <class name="role.Role" table="tab_role"
    <id name="id">
    <generator class="native"/>
    </id>
   <!-- 权限名称 -->  
    <property name="roleName" not-null="true">
    <column name="rolename"/>
    </property>
    <set name="users" table="tab_mapping">
    <key column="role_id"></key>
    <many-to-manyclass="user.User" column id="user_id"/>
    </set>
    </class>
 </hibernate-mapping>