|
Hibernate example source code file (Vehicle.hbm.xml)
The Hibernate Vehicle.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.hql"> <!-- Vehicle represents an abstract root of a union-subclass hierarchy --> <class name="Vehicle" abstract="true"> <id name="id" access="field" type="long"> <generator class="increment"/> </id> <property name="vin" type="string"/> <property name="owner" type="string"/> <!-- Car represents a concrete leaf of a union-subclass hierarchy with no concrete super --> <union-subclass name="Car"/> <!-- Truck represents a concrete subclass in a union-subclass hierarchy with concrete subclasses and no concrete super --> <union-subclass name="Truck"> <!-- Both SUV and Pickup represent concrete leaf of a union-subclass hierarchy (like Car), but with a concrete super --> <union-subclass name="SUV"/> <union-subclass name="Pickup"/> </union-subclass> </class> <sql-query name="native-delete-car"> <synchronize table="Car"/> delete from Car where owner = ? </sql-query> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Vehicle.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.