|
Hibernate example source code file (joined-subclass.hbm.xml)
The Hibernate joined-subclass.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.subclassfilter"> <class name="Person" table="JPerson"> <id name="id" column="person_id"> <generator class="native"/> </id> <property name="name"/> <property name="company"/> <property name="region"/> <joined-subclass name="Employee" table="JEmployee"> <key column="person_id"/> <property name="title"/> <property name="department" column="dept"/> <many-to-one name="manager" class="Employee" column="mgr_id" cascade="none"/> <set name="minions" inverse="true" cascade="all" lazy="true"> <key column="mgr_id"/> <one-to-many class="Employee"/> </set> </joined-subclass> <joined-subclass name="Customer" table="JCustomer"> <key column="person_id"/> <many-to-one name="contactOwner" class="Employee"/> </joined-subclass> <filter name="region" condition="region = :userRegion"/> </class> <filter-def name="region"> <filter-param name="userRegion" type="string"/> </filter-def> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate joined-subclass.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.