Java Reference
In-Depth Information
<hibernate-mapping>
<class name="sample.entity.User" table="aduser"
node="user">
<id name="id" type="long" column="id"
node="@id">
<generator class="native"/>
</id>
<property name="name" column="name" type="string" unique="true"
node="@name"/>
<property name="password" column="password" type="string"
node="@password"/>
</class>
<class name="sample.entity.Category" table="category"
node="category">
<id name="id" type="long" column="id"
node="@id">
<generator class="native"/>
</id>
<property name="title" column="title" type="string" unique="true"
node="@name"/>
<set name="adverts" table="link_category_advert"
node="." embed-xml="true">
<key column="category" foreign-key="fk_advert_category"/>
<many-to-many class="sample.entity.Advert"
column="advert" foreign-key="fk_category_advert"
embed-xml="false" node="advert"/>
</set>
</class>
<class name="sample.entity.Advert" table="advert"
node="advert">
<id name="id" type="long" column="id"
node="@id">
<generator class="native"/>
</id>
Search WWH ::




Custom Search