|
Hibernate example source code file (orm.xml)
The Hibernate orm.xml source code<?xml version="1.0" encoding="UTF-8"?> <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" > <named-query name="plane.getAll"> <query>select p from Plane p </named-query> <named-native-query name="night.getAll.bySQL" result-set-mapping="sqlmapping"> <query>select id, night_duration, night_date as dte, area_id from Night where night_duration > ? </named-native-query> <named-native-query name="getAreaByNative" result-class="org.hibernate.test.annotations.query.Area"> <query>select * from tbl_area </named-native-query> <sql-result-set-mapping name="sqlmapping"> <entity-result entity-class="org.hibernate.test.annotations.query.Night"> <field-result name="id" column="id"/> <field-result name="duration" column="night_duration"/> <field-result name="date" column="dte"/> <field-result name="area" column="area_id"/> </entity-result> </sql-result-set-mapping> </entity-mappings> Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate orm.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.