Newer
Older
CosmosServer / src / test / resources / Group.hbm.xml
  1. <?xml version="1.0"?>
  2.  
  3. <!--
  4. ~ Hibernate, Relational Persistence for Idiomatic Java
  5. ~
  6. ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
  7. ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
  8. -->
  9. <!DOCTYPE hibernate-mapping PUBLIC
  10. "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
  11. "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
  12.  
  13. <hibernate-mapping package="hibernateTest.entities">
  14.  
  15. <class name="Group" table="GROUPS">
  16. <id name="gId" column="GID">
  17. </id>
  18. <property name="uri" column="URI"/>
  19. <property name="name" column="NAME"/>
  20. <set name = "requests" cascade="all">
  21. <key column = "GID"/>
  22. <one-to-many class="Request"/>
  23. </set>
  24. <set name = "members"
  25. table = "GROUP_MEMBER"
  26. lazy = "true"
  27. inverse = "true"
  28. cascade = "all">
  29. <key column="GID"/>
  30. <many-to-many
  31. class="User"
  32. column="UID"
  33. outer-join="auto">
  34. </many-to-many>
  35. </set>
  36. </class>
  37.  
  38. </hibernate-mapping>