|
Hibernate example source code file (Stuff.hbm.xml)
The Hibernate Stuff.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"> <hibernate-mapping default-lazy="false"> <class name="org.hibernate.test.legacy.MoreStuff"> <composite-id> <key-property name="intId"/> <key-property name="stringId" length="32"/> </composite-id> <property name="name"/> <bag name="stuffs" inverse="true" lazy="false" cascade="all"> <key> <!--unfortunately have to specify not-null here because of limitation in schema export....--> <column name="moreInt" not-null="true"/> <column name="moreString" not-null="true" length="32"/> </key> <one-to-many class="org.hibernate.test.legacy.Stuff"/> </bag> </class> <class name="org.hibernate.test.legacy.Stuff"> <composite-id unsaved-value="any"> <key-property name="id"/> <key-many-to-one name="foo" class="org.hibernate.test.legacy.Foo"/> <key-many-to-one name="moreStuff" class="org.hibernate.test.legacy.MoreStuff"> <column name="moreInt"/> <column name="moreString" length="32"/> </key-many-to-one> </composite-id> <property name="property"/> </class> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Stuff.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.