|
Hibernate example source code file (FunctionNamesAsColumns.hbm.xml)
The Hibernate FunctionNamesAsColumns.hbm.xml source code<?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd" > <hibernate-mapping package="org.hibernate.test.hql"> <class name="EntityWithFunctionAsColumnHolder" table="ENTITY_WITH_FN_AS_COL_HOLDER"> <id name="id" column="ID" type="long"> <generator class="increment"/> </id> <many-to-one name="nextHolder" cascade="all"/> <set name="entityWithArgFunctionAsColumns" inverse="false" lazy="true" cascade="all-delete-orphan" order-by="lower,lower( upper )"> <key column="HOLDER_ID"/> <one-to-many class="EntityWithArgFunctionAsColumn"/> </set> <set name="entityWithNoArgFunctionAsColumns" inverse="false" lazy="true" cascade="all-delete-orphan" order-by="current_date, `current_date`"> <key column="HOLDER_ID"/> <one-to-many class="EntityWithNoArgFunctionAsColumn"/> </set> </class> <class name="EntityWithArgFunctionAsColumn" table="ENTITY_WITH_ARG_FN_AS_COL"> <id name="id" column="ID" type="long"> <generator class="increment"/> </id> <property name="lower" column="lower" type="int"/> <property name="upper" column="upper" type="string"/> </class> <class name="EntityWithNoArgFunctionAsColumn" table="ENTITY_WITH_NOARG_FN_AS_COL"> <id name="id" column="ID" type="long"> <generator class="increment"/> </id> <property name="currentDate" column="`current_date`" type="string"/> </class> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate FunctionNamesAsColumns.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.