|
Hibernate example source code file (UserPermissions.hbm.xml)
The Hibernate UserPermissions.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 use a composite element mapping to model a parent/child association. --> <hibernate-mapping package="org.hibernate.test.collection.original"> <import class="Permission"/> <class name="User" table="`Users`"> <id name="userName"/> <list name="permissions" lazy="extra"> <key column="userName"/> <list-index column="displayOrder" base="1"/> <composite-element class="Permission"> <property name="type" column="permissionType"/> </composite-element> </list> <list name="emailAddresses" fetch="join"> <key column="userName"/> <list-index column="displayOrder" base="1"/> <composite-element class="Email"> <property name="address"/> </composite-element> </list> <map name="sessionData" order-by="lower(`attributeName`) asc" lazy="extra"> <key column="userName"/> <map-key column="`attributeName`" type="string"/> <element column="`attributeValue`" type="serializable" not-null="true"/> </map> <set name="sessionAttributeNames" lazy="extra" inverse="true"> <key column="userName"/> <element column="`attributeName`" type="string"/> </set> </class> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate UserPermissions.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.