|
Hibernate example source code file (Category.hbm.xml)
The Hibernate Category.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.filter"> <class name="Category" table="CATEGORY"> <id name="id" column="CAT_ID"> <generator class="native"/> </id> <property name="name" type="string"/> <property name="effectiveStartDate" column="eff_start_dt" type="java.util.Date"/> <property name="effectiveEndDate" column="eff_end_dt" type="java.util.Date"/> <set cascade="none" inverse="true" name="products" table="PROD_CAT"> <key column="CAT_ID"/> <many-to-many column="PROD_ID" class="Product"/> </set> <filter name="effectiveDate" condition=":asOfDate BETWEEN eff_start_dt and eff_end_dt"/> <filter name="unioned"> 'abc' in ( select d.reg from DEPARTMENT d where (d.dept_id=123) union select p.name from SALES_PERSON p ) </filter> </class> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Category.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.