|
Hibernate example source code file (Master.hbm.xml)
The Hibernate Master.hbm.xml source code<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <!-- Demonstrates use of an association "filtered" using a formula mapping in the foreign key. --> <hibernate-mapping package="org.hibernate.test.formulajoin"> <class name="Master" table="t_masters"> <id name="id"> <generator class="increment"/> </id> <property name="name" not-null="true" length="100" update="false"/> <many-to-one name="detail" property-ref="currentMaster" insert="false" update="false"> <column name="id"/> <formula>1 </many-to-one> </class> <class name="Detail" table="t_details"> <id name="id"> <generator class="hilo"/> </id> <property name="details" length="300" update="false" not-null="true"/> <property name="version" update="false"> <column name="version" not-null="true" unique-key="masterVersion"/> </property> <properties name="currentMaster"> <many-to-one name="master"> <column name="cur_master" unique-key="masterVersion" not-null="true"/> </many-to-one> <property name="currentVersion" not-null="true"/> </properties> </class> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Master.hbm.xml source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.