|
Hibernate example source code file (Zoo.hbm.xml)
The Hibernate Zoo.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 package="org.hibernate.test.collection.original"> <class name="Zoo"> <id name="id" type="long"> <generator class="native" /> </id> <list name="animals" cascade="save-update,delete"> <key column="Zoo_id" not-null="true" /> <list-index column="list_index" /> <one-to-many class="Animal" not-found="ignore" /> </list> </class> <class name="Animal" discriminator-value="ANIMAL"> <id name="id" column="ID" type="long"> <generator class="native" /> </id> <discriminator column="discriminator" type="string" /> <property name="name"/> <many-to-one name="zoo" class="Zoo" cascade="save-update,delete" /> </class> <subclass name="Mammal" discriminator-value="MAMMAL" extends="Animal"> <join fetch="select" table="AnimalMammal"> <key column="Animal_id" /> <property name="mammalName" /> <property name="mammalName2" /> <property name="mammalName3" /> </join> </subclass> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Zoo.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.