Does Teneo deal with interfaces correctly? [message #596288] |
Wed, 29 November 2006 08:28 |
Ilya Klyuchnikov Messages: 74 Registered: July 2009 |
Member |
|
|
Hi Martin!
I have updated my model and now have problem during hibernate mapping
generation.
I have class IAdaptable in my model which is mapped to
org.eclipse.core.IAdaptable interface:
<eClassifiers xsi:type="ecore:EClass" name="IAdaptable"
instanceClassName="org.eclipse.core.runtime.IAdaptable"
interface="true"/>
Also I have class that implements this Interface:
<eClassifiers xsi:type="ecore:EClass" name="Placement"
eSuperTypes="#//IAdaptable">
...
</eClassifiers>
So in generated code I have:
package com.webamg.show.inventory;
import java.util.Date;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
public interface Placement extends EObject, IAdaptable ...
BUT when I try to create mapping I get:
<class entity-name="IAdaptable" abstract="true" lazy="false"
discriminator-value="IAdaptable" table="`iadaptable`">
<meta attribute="eclassName">IAdaptable</meta>
<meta attribute="epackage">http://www.webamg.com/show/inventory</meta>
<id type="long" name="e_id" column="e_id"
access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropertyHandler ">
<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.VersionProp ertyHandler ">
<meta attribute="syntheticVersion">true</meta>
</version>
</class>
<subclass entity-name="Placement" abstract="false" lazy="false"
extends="IAdaptable" discriminator-value="Placement">
It's wrong for me - I need to have:
<class entity-name="Placement" abstract="false" lazy="false"
discriminator-value="Placement" table="`placement`">
Also it's wrong cause IAdaptable is just interface - not an abstract class.
Is it a bug in Teneo or I need to customize behavior via jpa or hibernate
annotations in my model?
Thanks in advance.
Ilya
|
|
|
Powered by
FUDForum. Page generated in 0.02617 seconds