blob: 0bdc59248396bffea25ca01d0a4578a1134164d9 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping auto-import="false">
<class name="org.eclipse.emf.teneo.samples.emf.sample.employee.impl.DepartmentImpl" entity-name="Department" abstract="false" lazy="false" table="`DEPARTMENT`">
<meta attribute="eclassName" inherit="false">Department</meta>
<meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Employee</meta>
<id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
<meta attribute="syntheticId" inherit="false">true</meta>
<generator class="native"/>
</id>
<version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
<meta attribute="syntheticVersion" inherit="false">true</meta>
</version>
<property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String">
<column not-null="true" unique="false" name="`NAME`"/>
</property>
<bag name="employees" lazy="true" cascade="all,delete-orphan">
<key update="true" foreign-key="DEPARTMENT_EMPLOYEES">
<column name="`DEPARTMENT_EMPLOYEES_E_ID`" unique="false"/>
</key>
<one-to-many entity-name="Employee"/>
<filter name="ageRange" condition="age between :fromAge and :toAge"/>
<filter name="salaryHigherThan" condition="salary > :salary"/>
</bag>
</class>
<class name="org.eclipse.emf.teneo.samples.emf.sample.employee.impl.EmployeeImpl" entity-name="Employee" abstract="false" lazy="false" table="`EMPLOYEE`">
<meta attribute="eclassName" inherit="false">Employee</meta>
<meta attribute="epackage" inherit="false">http://www.eclipse.org/emf/teneo/samples/emf/sample/Employee</meta>
<id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
<meta attribute="syntheticId" inherit="false">true</meta>
<generator class="native"/>
</id>
<version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
<meta attribute="syntheticVersion" inherit="false">true</meta>
</version>
<property name="name" lazy="false" insert="true" update="true" not-null="true" unique="false" type="java.lang.String">
<column not-null="true" unique="false" name="`NAME`"/>
</property>
<property name="salary" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int">
<column not-null="false" unique="false" name="`SALARY`"/>
</property>
<property name="age" lazy="false" insert="true" update="true" not-null="false" unique="false" type="int">
<column not-null="false" unique="false" name="`AGE`"/>
</property>
<property name="hireDate" lazy="false" insert="true" update="true" not-null="true" unique="false" type="timestamp">
<column not-null="true" unique="false" name="`HIREDATE`"/>
</property>
<filter name="ageRange" condition="age between :fromAge and :toAge"/>
<filter name="salaryHigherThan" condition="salary > :salary"/>
<filter name="hireDate" condition="hireDate > :date"/>
</class>
<filter-def name="hireDate">
<filter-param name="date" type="date"/>
</filter-def>
<filter-def name="ageRange">
<filter-param name="fromAge" type="integer"/>
<filter-param name="toAge" type="integer"/>
</filter-def>
<filter-def name="salaryHigherThan">
<filter-param name="salary" type="integer"/>
</filter-def>
</hibernate-mapping>