|
Hibernate example source code file (ComponentOwner.hbm.xml)
The Hibernate ComponentOwner.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 package="org.hibernate.test.generated"> <class name="ComponentOwner" table="part_gen_comp"> <id name="id"> <generator class="increment"/> </id> <property name="name" /> <component name="component" class="ComponentOwner$Component"> <property name="generated" type="int" generated="always" column="GENED"/> </component> </class> <database-object> <create> <![CDATA[CREATE OR REPLACE TRIGGER t_iu_part_gen_comp BEFORE INSERT OR UPDATE ON part_gen_comp FOR EACH ROW BEGIN IF INSERTING THEN :new.gened := 1; ELSE :new.gened := :old.gened + 1; END IF; END;]]> </create> <drop> <![CDATA[DROP TRIGGER t_iu_part_gen_comp]]> </drop> <dialect-scope name="org.hibernate.dialect.Oracle9iDialect"/> <dialect-scope name="org.hibernate.dialect.Oracle10gDialect"/> </database-object> </hibernate-mapping> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate ComponentOwner.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.