|
Hibernate example source code file (Customer.hbm.xml)
The Hibernate Customer.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"> <!-- This mapping demonstrates how to map a collection <key> to one of the primary key columns of an associated child class with a composite key. This is very useful for legacy data! --> <hibernate-mapping package="org.hibernate.test.cid"> <class name="Customer"> <id name="customerId" length="10"> <generator class="assigned"/> </id> <property name="name" not-null="true" length="100"/> <property name="address" not-null="true" length="200"/> <list name="orders" inverse="true" cascade="save-update"> <key column="customerId"/> <index column="orderNumber"/> <one-to-many class="Order"/> </list> </class> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Customer.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.