|
Hibernate example source code file (CustomSQL.hbm.xml)
The Hibernate CustomSQL.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 default-lazy="false" package="org.hibernate.test.legacy"> <class name="Role"> <id name="id" type="long"> <generator class="native"/> </id> <property name="name" type="string"/> <set name="interventions" lazy="true" cascade="all"> <key column="role_id"/> <one-to-many class="Intervention"/> <sql-insert callable="false">/* max comment */ update Intervention set role_id=? where id=?</sql-insert> <sql-delete callable="false">update Intervention set role_id=null where role_id=? and id=? <sql-delete-all callable="false">update Intervention set role_id=null where role_id=? </set> <list name="bunchOfStrings"> <key column="GROUPID"/> <index column="posn"/> <element column="NAME" type="string"/> <sql-insert callable="true">{ ? = call createRoleBunchOfStrings(?, ?, ?)} <sql-update callable="true">{ ? = call updateRoleBunchOfStrings(?, ?, ?)} <sql-delete callable="true">{ ? = call deleteRoleBunchOfString(?, ?)} <sql-delete-all callable="true">{ ? = call deleteAllRoleBunchOfString(?)} </list> <!-- Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate CustomSQL.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.