Advertisement
NickJosevski

EntitiesGroup.hbm.xml

Aug 4th, 2011
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.92 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <hibernate-mapping
  3.    auto-import="true"
  4.    default-lazy="true"
  5.    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  6.    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7.    namespace="Rhino.Security.Model"
  8.    assembly="Rhino.Security"
  9.    xmlns="urn:nhibernate-mapping-2.2">
  10.  
  11.   <class name="EntitiesGroup" table="EntitiesGroups">
  12.     <cache usage="read-write" region="rhino-security"/>
  13.     <id name="Id" access="property" column="Id" type="System.Guid" unsaved-value="00000000-0000-0000-0000-000000000000">
  14.       <generator class="guid.comb"></generator>
  15.     </id>
  16.     <property name="Name" access="property" type="String">
  17.       <column name="Name" length="255" not-null="true" unique="true"/>
  18.     </property>
  19.     <many-to-one name="Parent" access="property" class="EntitiesGroup" column="Parent" />
  20.  
  21.     <set name="DirectChildren" access="property" table="EntitiesGroup"
  22.        lazy="true" inverse="true">
  23.       <cache usage="read-write" region="rhino-security"/>
  24.       <key column="Parent" />
  25.       <one-to-many class="EntitiesGroup"/>
  26.     </set>
  27.     <set name="Entities" access="property"
  28.        table="EntityReferencesToEntitiesGroups" lazy="true">
  29.       <cache usage="read-write" region="rhino-security"/>
  30.       <key column="GroupId" />
  31.       <many-to-many class="EntityReference" column="EntityReferenceId"/>
  32.     </set>
  33.     <set name="AllChildren" access="property" table="EntityGroupsHierarchy" lazy="true" inverse="true">
  34.       <cache usage="read-write" region="rhino-security"/>
  35.       <key column="ParentGroup" />
  36.       <many-to-many class="EntitiesGroup" column="ChildGroup"/>
  37.     </set>
  38.     <set name="AllParents" access="property" table="EntityGroupsHierarchy" lazy="true">
  39.       <cache usage="read-write" region="rhino-security"/>
  40.       <key column="ChildGroup"/>
  41.       <many-to-many class="EntitiesGroup" column="ParentGroup"/>
  42.     </set>
  43.   </class>
  44. </hibernate-mapping>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement