blob: afde9f5532897e421a067a5530b097e7ef58d811 [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" discriminator-value="Department" table="`department`">
<meta attribute="eclassName">Department</meta>
<meta attribute="epackage">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">true</meta>
<generator class="native"/>
</id>
<discriminator column="`dtype`" type="string"/>
<version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
<meta attribute="syntheticVersion">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`" not-null="false" 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" discriminator-value="Employee" table="`employee`">
<meta attribute="eclassName">Employee</meta>
<meta attribute="epackage">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">true</meta>
<generator class="native"/>
</id>
<discriminator column="`dtype`" type="string"/>
<version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
<meta attribute="syntheticVersion">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="true" unique="false" type="int">
<column not-null="true" unique="false" name="`salary`"/>
</property>
<property name="age" lazy="false" insert="true" update="true" not-null="true" unique="false" type="int">
<column not-null="true" 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>