Newer
Older
CosmosServer / src / test / resources / User.hbm.xml
<?xml version="1.0"?>

<!--
  ~ Hibernate, Relational Persistence for Idiomatic Java
  ~
  ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
  ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
  -->
<!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="hibernateTest.entities">

    <class name="User" table="USER">
        <id name="uId" column="UID">
        </id>
        <property name="name" column="NAME"/>
        <property name="uri" column="URI"/>
        <property name="pw" column="PW"/>
        <property name="iconUri" column="ICONURI"/>
        <property name="login" column="LOGIN"/>
        <set name = "groups"
             table = "USER_GROUP"
             lazy = "true"
             inverse = "false"
             cascade = "all">
            <key column = "UID"/>
            <one-to-many class = "hibernateTest.entities.Group"/>
        </set>
    </class>

</hibernate-mapping>