|
Hibernate example source code file (ContractVariation.hbm.xml)
The Hibernate ContractVariation.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"> <!-- Test for immutable classes/collections. --> <hibernate-mapping package="org.hibernate.test.immutable.entitywithmutablecollection"> <class name="Info" mutable="false"> <id name="id"> <generator class="increment"/> </id> <property name="text"/> </class> <class name="Plan" table="tbl_plan" mutable="false"> <id name="id"> <generator class="increment"/> </id> <property name="description" not-null="true"/> <set name="contracts" table="plan_contract" inverse="true" mutable="true" cascade="all" fetch="join"> <key column="col_plan"/> <many-to-many column="contract" class="Contract"/> </set> <set name="infos" inverse="true" mutable="true" cascade="all-delete-orphan"> <key column="col_plan"/> <one-to-many class="Info"/> </set> </class> <class name="Party" mutable="false"> <id name="id"> <generator class="increment"/> </id> <many-to-one name="contract" not-null="false"/> <property name="name" not-null="true"/> <set name="infos" inverse="true" mutable="true" cascade="all-delete-orphan"> <key column="party"/> <one-to-many class="Info"/> </set> </class> <class name="Contract" mutable="false"> <id name="id"> <generator class="increment"/> </id> <property name="customerName" not-null="true"/> <property name="type" not-null="true"/> <bag name="variations" inverse="true" order-by="id asc" mutable="true" cascade="all-delete-orphan" fetch="join"> <key column="contract"/> <one-to-many class="ContractVariation"/> </bag> <many-to-one name="parent" /> <set name="subcontracts" inverse="true" mutable="true" cascade="all" fetch="join"> <key column="parent"/> <one-to-many class="Contract"/> </set> <set name="plans" table="plan_contract" inverse="false" mutable="true" cascade="none"> <key column="contract"/> <many-to-many column="col_plan" class="Plan"/> </set> <set name="parties" inverse="true" mutable="true" cascade="all" fetch="join"> <key column="contract"/> <one-to-many class="Party"/> </set> <set name="infos" inverse="true" mutable="true" cascade="all-delete-orphan"> <key column="contract"/> <one-to-many class="Info"/> </set> </class> <class name="ContractVariation" mutable="false"> <id name="id"> <generator class="increment"/> </id> <property name="text" type="text"/> <many-to-one name="contract" not-null="false"/> <set name="infos" inverse="true" mutable="true" cascade="all-delete-orphan"> <key column="contractvariation"/> <one-to-many class="Info"/> </set> </class> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate ContractVariation.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.