|
Hibernate example source code file (Mappings.hbm.xml)
The Hibernate Mappings.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.abstractembeddedcomponents.propertyref"> <class name="Address" table="ADDRESS" proxy="Address"> <id name="id" type="long" column="ADDRESS_ID"> <generator class="native"/> </id> <discriminator column="ADDRESS_TYPE" type="string" length="30"/> <properties name="uniqueAddress"> <property name="addressType" column="ADDRESS_TYPE" type="string" insert="false" update="false" length="30"/> <many-to-one name="server" column="SERVER_ID" class="Server" not-null="true"/> </properties> </class> <subclass name="AddressImpl" extends="Address" discriminator-value="2" proxy="Address"> </subclass> <class name="Server" table="SERVER" proxy="Server"> <id name="id" type="long" column="SERVER_ID"> <generator class="native"/> </id> <discriminator column="SERVER_TYPE" type="string" length="10"/> <property name="serverType" type="string" column="SERVER_TYPE" length="10" update="false" insert="false"/> </class> <subclass name="ServerImpl" extends="Server" discriminator-value="1" proxy="Server"> <many-to-one name="address" class="AddressImpl" property-ref="uniqueAddress" cascade="all" unique="true" update="false" insert="false"> <column name="ADDRESS_TYPE"/> <column name="SERVER_ID"/> </many-to-one> </subclass> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Mappings.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.