|
Hibernate example source code file (mappings.hbm.xml)
The Hibernate mappings.hbm.xml source code<?xml version="1.0" encoding="WINDOWS-1251"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.Master" table="HIB_MASTER_ENTITY"> <id name="id" column="ID" type="long"> <generator class="increment" /> </id> <property name="str" column="STR" /> <bag name="items" lazy="true" cascade="all" access="property" inverse="true" table="HIB_MASTER_DETAIL"> <key column="ID_MASTER" /> <many-to-many class="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.DetailSubclass2" column="ID_DETAIL" /> </bag> </class> <class name="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.DetailSuperclass" table="HIB_DETAIL_ENTITY" abstract="true"> <id name="id" column="ID" type="long"> <generator class="increment" /> </id> <discriminator column="DISCRIMINATOR" type="string" /> <bag name="masters" lazy="true" access="property" table="HIB_MASTER_DETAIL"> <key column="ID_DETAIL" /> <many-to-many class="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.Master" column="ID_MASTER" /> </bag> <subclass name="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.DetailSubclass" discriminator-value="SUB"> <property name="str2" column="STR2" /> <subclass name="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.DetailSubclass2" discriminator-value="SUB2" extends="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.DetailSubclass"> <property name="str3" column="STR3" /> </subclass> </subclass> </class> </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-2024 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.