Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Trouble using 'embedded' annotation
Trouble using 'embedded' annotation [message #85254] Tue, 29 May 2007 21:25 Go to next message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
Hi All,

I'm still having trouble making embedded objects work. I'm trying to get
VSPDate and VSPDateTime to appear in the table for my Network object which
extends the Persistent object. I see other simple fields from Persistent
show up. However the embeded columns from lastUpdateDateTime and
versionCreateDate do not appear in the database.

Thanks for any suggestions,

Jason Henriksen

<?xml version="1.0" encoding="UTF-8"?>
<p:persistence-mapping xmlns:p="http://www.eclipse.org/emft/teneo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.eclipse.org/emft/teneo
persistence-mapping-hibernate.xsd ">
<p:epackage namespace-uri="http://vsp.com/">
<!-- ignore the transport classes -->
<p:eclass name="CreateType"><p:transient /></p:eclass>
<p:eclass name="CreateResponseType"><p:transient /></p:eclass>
<p:eclass name="DeleteType"><p:transient /></p:eclass>
<p:eclass name="DeleteResponseType"><p:transient /></p:eclass>

<!-- make vspdate embeddable -->
<p:eclass name="VSPDateTime"> <p:embeddable/> </p:eclass>
<p:eclass name="VSPDate"> <p:embeddable/> </p:eclass>


<!-- embed the dates -->
<p:eclass name="Persistent">
<p:property name="lastUpdateDateTime">
<p:embedded/>
</p:property>
<p:property name="versionCreateDate">
<p:embedded/>
</p:property>
</p:eclass>



</p:epackage>
</p:persistence-mapping>
Re: Trouble using 'embedded' annotation [message #85271 is a reply to message #85254] Tue, 29 May 2007 21:41 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
How does the resulting hbm look like (hbDataStore.getMappingXML())?

gr. Martin

Jason Henriksen wrote:
> Hi All,
>
> I'm still having trouble making embedded objects work. I'm trying to get
> VSPDate and VSPDateTime to appear in the table for my Network object which
> extends the Persistent object. I see other simple fields from Persistent
> show up. However the embeded columns from lastUpdateDateTime and
> versionCreateDate do not appear in the database.
>
> Thanks for any suggestions,
>
> Jason Henriksen
>
> <?xml version="1.0" encoding="UTF-8"?>
> <p:persistence-mapping xmlns:p="http://www.eclipse.org/emft/teneo"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.eclipse.org/emft/teneo
> persistence-mapping-hibernate.xsd ">
> <p:epackage namespace-uri="http://vsp.com/">
> <!-- ignore the transport classes -->
> <p:eclass name="CreateType"><p:transient /></p:eclass>
> <p:eclass name="CreateResponseType"><p:transient /></p:eclass>
> <p:eclass name="DeleteType"><p:transient /></p:eclass>
> <p:eclass name="DeleteResponseType"><p:transient /></p:eclass>
>
> <!-- make vspdate embeddable -->
> <p:eclass name="VSPDateTime"> <p:embeddable/> </p:eclass>
> <p:eclass name="VSPDate"> <p:embeddable/> </p:eclass>
>
>
> <!-- embed the dates -->
> <p:eclass name="Persistent">
> <p:property name="lastUpdateDateTime">
> <p:embedded/>
> </p:property>
> <p:property name="versionCreateDate">
> <p:embedded/>
> </p:property>
> </p:eclass>
>
>
>
> </p:epackage>
> </p:persistence-mapping>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Trouble using 'embedded' annotation [message #85286 is a reply to message #85271] Tue, 29 May 2007 22:24 Go to previous messageGo to next message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<!-- Generated by Teneo on Tue May 29 14:10:18 PDT 2007 -->
<hibernate-mapping>
<class name="com.vsp.bl.base.impl.RootObjectImpl" entity-name="RootObject"
abstract="false" lazy="false" discriminator-value="RootObject"
table="`rootobject`">
<meta attribute="eclassName">RootObject</meta>
<meta attribute="epackage">http://vsp.com/</meta>
<id type="long" name="e_id" column="e_id"
access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropert
yHandler">
<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 ertyHand
ler">
<meta attribute="syntheticVersion">true</meta>
</version>
<property name="empty" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="boolean">
<column not-null="false" unique="false" name="`empty`"/>
</property>
</class>
<subclass name="com.vsp.bl.base.impl.BusinessKeyImpl"
entity-name="BusinessKey" abstract="false" lazy="false" extends="RootObject"
discriminator-value="BusinessKey">
<meta attribute="eclassName">BusinessKey</meta>
<meta attribute="epackage">http://vsp.com/</meta>
</subclass>
<subclass name="com.vsp.bl.base.impl.PersistentImpl"
entity-name="Persistent" abstract="false" lazy="false" extends="RootObject"
discriminator-value="Persistent">
<meta attribute="eclassName">Persistent</meta>
<meta attribute="epackage">http://vsp.com/</meta>
<component name="lastUpdateDateTime"
class="com.vsp.bl.base.impl.VSPDateTimeImpl"/>
<property name="lastUpdateId" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`lastupdateid`"/>
</property>
<property name="lockCount" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="int">
<column not-null="false" unique="false" name="`lockcount`"/>
</property>
<component name="versionCreateDate"
class="com.vsp.bl.base.impl.VSPDateImpl"/>
</subclass>
<subclass name="com.vsp.bl.base.impl.EntityImpl" entity-name="Entity"
abstract="false" lazy="false" extends="Persistent"
discriminator-value="Entity">
<meta attribute="eclassName">Entity</meta>
<meta attribute="epackage">http://vsp.com/</meta>
<many-to-one name="businessKey" entity-name="BusinessKey" cascade="all"
lazy="false" insert="true" update="true" not-null="false">
<column not-null="false" unique="false"
name="`businesskey_businesskey_e_id`"/>
</many-to-one>
<many-to-one name="uuid" entity-name="UUID" cascade="all" lazy="false"
insert="true" update="true" not-null="false">
<column not-null="false" unique="false" name="`uuid_uuid_e_id`"/>
</many-to-one>
<property name="businessTransactionId" lazy="false" insert="true"
update="true" not-null="false" unique="false" type="int">
<column not-null="false" unique="false" name="`businesstransactionid`"/>
</property>
<property name="version" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="int">
<column not-null="false" unique="false" name="`version`"/>
</property>
</subclass>
<subclass name="com.vsp.bl.base.impl.NetworkImpl" entity-name="Network"
abstract="false" lazy="false" extends="Entity"
discriminator-value="Network">
<meta attribute="eclassName">Network</meta>
<meta attribute="epackage">http://vsp.com/</meta>
<property name="description" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`description`"/>
</property>
<property name="name" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`name`"/>
</property>
</subclass>
<class name="com.vsp.bl.base.impl.UUIDImpl" entity-name="UUID"
abstract="false" lazy="false" discriminator-value="UUID" table="`uuid`">
<meta attribute="eclassName">UUID</meta>
<meta attribute="epackage">http://vsp.com/</meta>
<id type="long" name="e_id" column="e_id"
access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropert
yHandler">
<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 ertyHand
ler">
<meta attribute="syntheticVersion">true</meta>
</version>
<property name="uuidImpl" lazy="false" insert="true" update="true"
not-null="true" unique="false" type="java.math.BigInteger">
<column not-null="true" unique="false" name="`uuidimpl`"/>
</property>
</class>
</hibernate-mapping>


"Martin Taal" <mtaal@elver.org> wrote in message
news:f3i6lq$6a0$1@build.eclipse.org...
> Hi Jason,
> How does the resulting hbm look like (hbDataStore.getMappingXML())?
>
> gr. Martin
>
> Jason Henriksen wrote:
> > Hi All,
> >
> > I'm still having trouble making embedded objects work. I'm trying to
get
> > VSPDate and VSPDateTime to appear in the table for my Network object
which
> > extends the Persistent object. I see other simple fields from
Persistent
> > show up. However the embeded columns from lastUpdateDateTime and
> > versionCreateDate do not appear in the database.
> >
> > Thanks for any suggestions,
> >
> > Jason Henriksen
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <p:persistence-mapping xmlns:p="http://www.eclipse.org/emft/teneo"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://www.eclipse.org/emft/teneo
> > persistence-mapping-hibernate.xsd ">
> > <p:epackage namespace-uri="http://vsp.com/">
> > <!-- ignore the transport classes -->
> > <p:eclass name="CreateType"><p:transient /></p:eclass>
> > <p:eclass name="CreateResponseType"><p:transient /></p:eclass>
> > <p:eclass name="DeleteType"><p:transient /></p:eclass>
> > <p:eclass name="DeleteResponseType"><p:transient /></p:eclass>
> >
> > <!-- make vspdate embeddable -->
> > <p:eclass name="VSPDateTime"> <p:embeddable/> </p:eclass>
> > <p:eclass name="VSPDate"> <p:embeddable/> </p:eclass>
> >
> >
> > <!-- embed the dates -->
> > <p:eclass name="Persistent">
> > <p:property name="lastUpdateDateTime">
> > <p:embedded/>
> > </p:property>
> > <p:property name="versionCreateDate">
> > <p:embedded/>
> > </p:property>
> > </p:eclass>
> >
> >
> >
> > </p:epackage>
> > </p:persistence-mapping>
> >
> >
>
>
> --
>
> With Regards, Martin Taal
>
> Springsite/Elver.org
> Office: Hardwareweg 4, 3821 BV Amersfoort
> Postal: Nassaulaan 7, 3941 EC Doorn
> The Netherlands
> Tel: +31 (0)84 420 2397
> Fax: +31 (0)84 225 9307
> Mail: mtaal@springsite.com - mtaal@elver.org
> Web: www.springsite.com - www.elver.org
Re: Trouble using 'embedded' annotation [message #85302 is a reply to message #85286] Wed, 30 May 2007 03:40 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
They are embedded (see the component tag) but the embedded types do not seem to have any properties.
How does the ecore of the embedded (embeddable) types look like?

gr. Martin

Jason Henriksen wrote:
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
> 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
>
> <!-- Generated by Teneo on Tue May 29 14:10:18 PDT 2007 -->
> <hibernate-mapping>
> <class name="com.vsp.bl.base.impl.RootObjectImpl" entity-name="RootObject"
> abstract="false" lazy="false" discriminator-value="RootObject"
> table="`rootobject`">
> <meta attribute="eclassName">RootObject</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> <id type="long" name="e_id" column="e_id"
> access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropert
> yHandler">
> <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 ertyHand
> ler">
> <meta attribute="syntheticVersion">true</meta>
> </version>
> <property name="empty" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="boolean">
> <column not-null="false" unique="false" name="`empty`"/>
> </property>
> </class>
> <subclass name="com.vsp.bl.base.impl.BusinessKeyImpl"
> entity-name="BusinessKey" abstract="false" lazy="false" extends="RootObject"
> discriminator-value="BusinessKey">
> <meta attribute="eclassName">BusinessKey</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> </subclass>
> <subclass name="com.vsp.bl.base.impl.PersistentImpl"
> entity-name="Persistent" abstract="false" lazy="false" extends="RootObject"
> discriminator-value="Persistent">
> <meta attribute="eclassName">Persistent</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> <component name="lastUpdateDateTime"
> class="com.vsp.bl.base.impl.VSPDateTimeImpl"/>
> <property name="lastUpdateId" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`lastupdateid`"/>
> </property>
> <property name="lockCount" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="int">
> <column not-null="false" unique="false" name="`lockcount`"/>
> </property>
> <component name="versionCreateDate"
> class="com.vsp.bl.base.impl.VSPDateImpl"/>
> </subclass>
> <subclass name="com.vsp.bl.base.impl.EntityImpl" entity-name="Entity"
> abstract="false" lazy="false" extends="Persistent"
> discriminator-value="Entity">
> <meta attribute="eclassName">Entity</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> <many-to-one name="businessKey" entity-name="BusinessKey" cascade="all"
> lazy="false" insert="true" update="true" not-null="false">
> <column not-null="false" unique="false"
> name="`businesskey_businesskey_e_id`"/>
> </many-to-one>
> <many-to-one name="uuid" entity-name="UUID" cascade="all" lazy="false"
> insert="true" update="true" not-null="false">
> <column not-null="false" unique="false" name="`uuid_uuid_e_id`"/>
> </many-to-one>
> <property name="businessTransactionId" lazy="false" insert="true"
> update="true" not-null="false" unique="false" type="int">
> <column not-null="false" unique="false" name="`businesstransactionid`"/>
> </property>
> <property name="version" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="int">
> <column not-null="false" unique="false" name="`version`"/>
> </property>
> </subclass>
> <subclass name="com.vsp.bl.base.impl.NetworkImpl" entity-name="Network"
> abstract="false" lazy="false" extends="Entity"
> discriminator-value="Network">
> <meta attribute="eclassName">Network</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> <property name="description" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`description`"/>
> </property>
> <property name="name" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`name`"/>
> </property>
> </subclass>
> <class name="com.vsp.bl.base.impl.UUIDImpl" entity-name="UUID"
> abstract="false" lazy="false" discriminator-value="UUID" table="`uuid`">
> <meta attribute="eclassName">UUID</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> <id type="long" name="e_id" column="e_id"
> access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropert
> yHandler">
> <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 ertyHand
> ler">
> <meta attribute="syntheticVersion">true</meta>
> </version>
> <property name="uuidImpl" lazy="false" insert="true" update="true"
> not-null="true" unique="false" type="java.math.BigInteger">
> <column not-null="true" unique="false" name="`uuidimpl`"/>
> </property>
> </class>
> </hibernate-mapping>
>
>
> "Martin Taal" <mtaal@elver.org> wrote in message
> news:f3i6lq$6a0$1@build.eclipse.org...
>> Hi Jason,
>> How does the resulting hbm look like (hbDataStore.getMappingXML())?
>>
>> gr. Martin
>>
>> Jason Henriksen wrote:
>>> Hi All,
>>>
>>> I'm still having trouble making embedded objects work. I'm trying to
> get
>>> VSPDate and VSPDateTime to appear in the table for my Network object
> which
>>> extends the Persistent object. I see other simple fields from
> Persistent
>>> show up. However the embeded columns from lastUpdateDateTime and
>>> versionCreateDate do not appear in the database.
>>>
>>> Thanks for any suggestions,
>>>
>>> Jason Henriksen
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <p:persistence-mapping xmlns:p="http://www.eclipse.org/emft/teneo"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xsi:schemaLocation="http://www.eclipse.org/emft/teneo
>>> persistence-mapping-hibernate.xsd ">
>>> <p:epackage namespace-uri="http://vsp.com/">
>>> <!-- ignore the transport classes -->
>>> <p:eclass name="CreateType"><p:transient /></p:eclass>
>>> <p:eclass name="CreateResponseType"><p:transient /></p:eclass>
>>> <p:eclass name="DeleteType"><p:transient /></p:eclass>
>>> <p:eclass name="DeleteResponseType"><p:transient /></p:eclass>
>>>
>>> <!-- make vspdate embeddable -->
>>> <p:eclass name="VSPDateTime"> <p:embeddable/> </p:eclass>
>>> <p:eclass name="VSPDate"> <p:embeddable/> </p:eclass>
>>>
>>>
>>> <!-- embed the dates -->
>>> <p:eclass name="Persistent">
>>> <p:property name="lastUpdateDateTime">
>>> <p:embedded/>
>>> </p:property>
>>> <p:property name="versionCreateDate">
>>> <p:embedded/>
>>> </p:property>
>>> </p:eclass>
>>>
>>>
>>>
>>> </p:epackage>
>>> </p:persistence-mapping>
>>>
>>>
>>
>> --
>>
>> With Regards, Martin Taal
>>
>> Springsite/Elver.org
>> Office: Hardwareweg 4, 3821 BV Amersfoort
>> Postal: Nassaulaan 7, 3941 EC Doorn
>> The Netherlands
>> Tel: +31 (0)84 420 2397
>> Fax: +31 (0)84 225 9307
>> Mail: mtaal@springsite.com - mtaal@elver.org
>> Web: www.springsite.com - www.elver.org
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Trouble using 'embedded' annotation [message #85353 is a reply to message #85302] Wed, 30 May 2007 23:04 Go to previous message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
Right you are. Somehow that definition information got lost from my XSD
model. *sigh*

Sorry for the useless post.

Jason
Re: Trouble using 'embedded' annotation [message #606817 is a reply to message #85254] Tue, 29 May 2007 21:41 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
How does the resulting hbm look like (hbDataStore.getMappingXML())?

gr. Martin

Jason Henriksen wrote:
> Hi All,
>
> I'm still having trouble making embedded objects work. I'm trying to get
> VSPDate and VSPDateTime to appear in the table for my Network object which
> extends the Persistent object. I see other simple fields from Persistent
> show up. However the embeded columns from lastUpdateDateTime and
> versionCreateDate do not appear in the database.
>
> Thanks for any suggestions,
>
> Jason Henriksen
>
> <?xml version="1.0" encoding="UTF-8"?>
> <p:persistence-mapping xmlns:p="http://www.eclipse.org/emft/teneo"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.eclipse.org/emft/teneo
> persistence-mapping-hibernate.xsd ">
> <p:epackage namespace-uri="http://vsp.com/">
> <!-- ignore the transport classes -->
> <p:eclass name="CreateType"><p:transient /></p:eclass>
> <p:eclass name="CreateResponseType"><p:transient /></p:eclass>
> <p:eclass name="DeleteType"><p:transient /></p:eclass>
> <p:eclass name="DeleteResponseType"><p:transient /></p:eclass>
>
> <!-- make vspdate embeddable -->
> <p:eclass name="VSPDateTime"> <p:embeddable/> </p:eclass>
> <p:eclass name="VSPDate"> <p:embeddable/> </p:eclass>
>
>
> <!-- embed the dates -->
> <p:eclass name="Persistent">
> <p:property name="lastUpdateDateTime">
> <p:embedded/>
> </p:property>
> <p:property name="versionCreateDate">
> <p:embedded/>
> </p:property>
> </p:eclass>
>
>
>
> </p:epackage>
> </p:persistence-mapping>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Trouble using 'embedded' annotation [message #606821 is a reply to message #85271] Tue, 29 May 2007 22:24 Go to previous message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<!-- Generated by Teneo on Tue May 29 14:10:18 PDT 2007 -->
<hibernate-mapping>
<class name="com.vsp.bl.base.impl.RootObjectImpl" entity-name="RootObject"
abstract="false" lazy="false" discriminator-value="RootObject"
table="`rootobject`">
<meta attribute="eclassName">RootObject</meta>
<meta attribute="epackage">http://vsp.com/</meta>
<id type="long" name="e_id" column="e_id"
access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropert
yHandler">
<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 ertyHand
ler">
<meta attribute="syntheticVersion">true</meta>
</version>
<property name="empty" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="boolean">
<column not-null="false" unique="false" name="`empty`"/>
</property>
</class>
<subclass name="com.vsp.bl.base.impl.BusinessKeyImpl"
entity-name="BusinessKey" abstract="false" lazy="false" extends="RootObject"
discriminator-value="BusinessKey">
<meta attribute="eclassName">BusinessKey</meta>
<meta attribute="epackage">http://vsp.com/</meta>
</subclass>
<subclass name="com.vsp.bl.base.impl.PersistentImpl"
entity-name="Persistent" abstract="false" lazy="false" extends="RootObject"
discriminator-value="Persistent">
<meta attribute="eclassName">Persistent</meta>
<meta attribute="epackage">http://vsp.com/</meta>
<component name="lastUpdateDateTime"
class="com.vsp.bl.base.impl.VSPDateTimeImpl"/>
<property name="lastUpdateId" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`lastupdateid`"/>
</property>
<property name="lockCount" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="int">
<column not-null="false" unique="false" name="`lockcount`"/>
</property>
<component name="versionCreateDate"
class="com.vsp.bl.base.impl.VSPDateImpl"/>
</subclass>
<subclass name="com.vsp.bl.base.impl.EntityImpl" entity-name="Entity"
abstract="false" lazy="false" extends="Persistent"
discriminator-value="Entity">
<meta attribute="eclassName">Entity</meta>
<meta attribute="epackage">http://vsp.com/</meta>
<many-to-one name="businessKey" entity-name="BusinessKey" cascade="all"
lazy="false" insert="true" update="true" not-null="false">
<column not-null="false" unique="false"
name="`businesskey_businesskey_e_id`"/>
</many-to-one>
<many-to-one name="uuid" entity-name="UUID" cascade="all" lazy="false"
insert="true" update="true" not-null="false">
<column not-null="false" unique="false" name="`uuid_uuid_e_id`"/>
</many-to-one>
<property name="businessTransactionId" lazy="false" insert="true"
update="true" not-null="false" unique="false" type="int">
<column not-null="false" unique="false" name="`businesstransactionid`"/>
</property>
<property name="version" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="int">
<column not-null="false" unique="false" name="`version`"/>
</property>
</subclass>
<subclass name="com.vsp.bl.base.impl.NetworkImpl" entity-name="Network"
abstract="false" lazy="false" extends="Entity"
discriminator-value="Network">
<meta attribute="eclassName">Network</meta>
<meta attribute="epackage">http://vsp.com/</meta>
<property name="description" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`description`"/>
</property>
<property name="name" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`name`"/>
</property>
</subclass>
<class name="com.vsp.bl.base.impl.UUIDImpl" entity-name="UUID"
abstract="false" lazy="false" discriminator-value="UUID" table="`uuid`">
<meta attribute="eclassName">UUID</meta>
<meta attribute="epackage">http://vsp.com/</meta>
<id type="long" name="e_id" column="e_id"
access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropert
yHandler">
<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 ertyHand
ler">
<meta attribute="syntheticVersion">true</meta>
</version>
<property name="uuidImpl" lazy="false" insert="true" update="true"
not-null="true" unique="false" type="java.math.BigInteger">
<column not-null="true" unique="false" name="`uuidimpl`"/>
</property>
</class>
</hibernate-mapping>


"Martin Taal" <mtaal@elver.org> wrote in message
news:f3i6lq$6a0$1@build.eclipse.org...
> Hi Jason,
> How does the resulting hbm look like (hbDataStore.getMappingXML())?
>
> gr. Martin
>
> Jason Henriksen wrote:
> > Hi All,
> >
> > I'm still having trouble making embedded objects work. I'm trying to
get
> > VSPDate and VSPDateTime to appear in the table for my Network object
which
> > extends the Persistent object. I see other simple fields from
Persistent
> > show up. However the embeded columns from lastUpdateDateTime and
> > versionCreateDate do not appear in the database.
> >
> > Thanks for any suggestions,
> >
> > Jason Henriksen
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <p:persistence-mapping xmlns:p="http://www.eclipse.org/emft/teneo"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://www.eclipse.org/emft/teneo
> > persistence-mapping-hibernate.xsd ">
> > <p:epackage namespace-uri="http://vsp.com/">
> > <!-- ignore the transport classes -->
> > <p:eclass name="CreateType"><p:transient /></p:eclass>
> > <p:eclass name="CreateResponseType"><p:transient /></p:eclass>
> > <p:eclass name="DeleteType"><p:transient /></p:eclass>
> > <p:eclass name="DeleteResponseType"><p:transient /></p:eclass>
> >
> > <!-- make vspdate embeddable -->
> > <p:eclass name="VSPDateTime"> <p:embeddable/> </p:eclass>
> > <p:eclass name="VSPDate"> <p:embeddable/> </p:eclass>
> >
> >
> > <!-- embed the dates -->
> > <p:eclass name="Persistent">
> > <p:property name="lastUpdateDateTime">
> > <p:embedded/>
> > </p:property>
> > <p:property name="versionCreateDate">
> > <p:embedded/>
> > </p:property>
> > </p:eclass>
> >
> >
> >
> > </p:epackage>
> > </p:persistence-mapping>
> >
> >
>
>
> --
>
> With Regards, Martin Taal
>
> Springsite/Elver.org
> Office: Hardwareweg 4, 3821 BV Amersfoort
> Postal: Nassaulaan 7, 3941 EC Doorn
> The Netherlands
> Tel: +31 (0)84 420 2397
> Fax: +31 (0)84 225 9307
> Mail: mtaal@springsite.com - mtaal@elver.org
> Web: www.springsite.com - www.elver.org
Re: Trouble using 'embedded' annotation [message #606825 is a reply to message #85286] Wed, 30 May 2007 03:40 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
They are embedded (see the component tag) but the embedded types do not seem to have any properties.
How does the ecore of the embedded (embeddable) types look like?

gr. Martin

Jason Henriksen wrote:
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
> 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
>
> <!-- Generated by Teneo on Tue May 29 14:10:18 PDT 2007 -->
> <hibernate-mapping>
> <class name="com.vsp.bl.base.impl.RootObjectImpl" entity-name="RootObject"
> abstract="false" lazy="false" discriminator-value="RootObject"
> table="`rootobject`">
> <meta attribute="eclassName">RootObject</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> <id type="long" name="e_id" column="e_id"
> access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropert
> yHandler">
> <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 ertyHand
> ler">
> <meta attribute="syntheticVersion">true</meta>
> </version>
> <property name="empty" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="boolean">
> <column not-null="false" unique="false" name="`empty`"/>
> </property>
> </class>
> <subclass name="com.vsp.bl.base.impl.BusinessKeyImpl"
> entity-name="BusinessKey" abstract="false" lazy="false" extends="RootObject"
> discriminator-value="BusinessKey">
> <meta attribute="eclassName">BusinessKey</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> </subclass>
> <subclass name="com.vsp.bl.base.impl.PersistentImpl"
> entity-name="Persistent" abstract="false" lazy="false" extends="RootObject"
> discriminator-value="Persistent">
> <meta attribute="eclassName">Persistent</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> <component name="lastUpdateDateTime"
> class="com.vsp.bl.base.impl.VSPDateTimeImpl"/>
> <property name="lastUpdateId" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`lastupdateid`"/>
> </property>
> <property name="lockCount" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="int">
> <column not-null="false" unique="false" name="`lockcount`"/>
> </property>
> <component name="versionCreateDate"
> class="com.vsp.bl.base.impl.VSPDateImpl"/>
> </subclass>
> <subclass name="com.vsp.bl.base.impl.EntityImpl" entity-name="Entity"
> abstract="false" lazy="false" extends="Persistent"
> discriminator-value="Entity">
> <meta attribute="eclassName">Entity</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> <many-to-one name="businessKey" entity-name="BusinessKey" cascade="all"
> lazy="false" insert="true" update="true" not-null="false">
> <column not-null="false" unique="false"
> name="`businesskey_businesskey_e_id`"/>
> </many-to-one>
> <many-to-one name="uuid" entity-name="UUID" cascade="all" lazy="false"
> insert="true" update="true" not-null="false">
> <column not-null="false" unique="false" name="`uuid_uuid_e_id`"/>
> </many-to-one>
> <property name="businessTransactionId" lazy="false" insert="true"
> update="true" not-null="false" unique="false" type="int">
> <column not-null="false" unique="false" name="`businesstransactionid`"/>
> </property>
> <property name="version" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="int">
> <column not-null="false" unique="false" name="`version`"/>
> </property>
> </subclass>
> <subclass name="com.vsp.bl.base.impl.NetworkImpl" entity-name="Network"
> abstract="false" lazy="false" extends="Entity"
> discriminator-value="Network">
> <meta attribute="eclassName">Network</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> <property name="description" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`description`"/>
> </property>
> <property name="name" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`name`"/>
> </property>
> </subclass>
> <class name="com.vsp.bl.base.impl.UUIDImpl" entity-name="UUID"
> abstract="false" lazy="false" discriminator-value="UUID" table="`uuid`">
> <meta attribute="eclassName">UUID</meta>
> <meta attribute="epackage">http://vsp.com/</meta>
> <id type="long" name="e_id" column="e_id"
> access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropert
> yHandler">
> <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 ertyHand
> ler">
> <meta attribute="syntheticVersion">true</meta>
> </version>
> <property name="uuidImpl" lazy="false" insert="true" update="true"
> not-null="true" unique="false" type="java.math.BigInteger">
> <column not-null="true" unique="false" name="`uuidimpl`"/>
> </property>
> </class>
> </hibernate-mapping>
>
>
> "Martin Taal" <mtaal@elver.org> wrote in message
> news:f3i6lq$6a0$1@build.eclipse.org...
>> Hi Jason,
>> How does the resulting hbm look like (hbDataStore.getMappingXML())?
>>
>> gr. Martin
>>
>> Jason Henriksen wrote:
>>> Hi All,
>>>
>>> I'm still having trouble making embedded objects work. I'm trying to
> get
>>> VSPDate and VSPDateTime to appear in the table for my Network object
> which
>>> extends the Persistent object. I see other simple fields from
> Persistent
>>> show up. However the embeded columns from lastUpdateDateTime and
>>> versionCreateDate do not appear in the database.
>>>
>>> Thanks for any suggestions,
>>>
>>> Jason Henriksen
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <p:persistence-mapping xmlns:p="http://www.eclipse.org/emft/teneo"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xsi:schemaLocation="http://www.eclipse.org/emft/teneo
>>> persistence-mapping-hibernate.xsd ">
>>> <p:epackage namespace-uri="http://vsp.com/">
>>> <!-- ignore the transport classes -->
>>> <p:eclass name="CreateType"><p:transient /></p:eclass>
>>> <p:eclass name="CreateResponseType"><p:transient /></p:eclass>
>>> <p:eclass name="DeleteType"><p:transient /></p:eclass>
>>> <p:eclass name="DeleteResponseType"><p:transient /></p:eclass>
>>>
>>> <!-- make vspdate embeddable -->
>>> <p:eclass name="VSPDateTime"> <p:embeddable/> </p:eclass>
>>> <p:eclass name="VSPDate"> <p:embeddable/> </p:eclass>
>>>
>>>
>>> <!-- embed the dates -->
>>> <p:eclass name="Persistent">
>>> <p:property name="lastUpdateDateTime">
>>> <p:embedded/>
>>> </p:property>
>>> <p:property name="versionCreateDate">
>>> <p:embedded/>
>>> </p:property>
>>> </p:eclass>
>>>
>>>
>>>
>>> </p:epackage>
>>> </p:persistence-mapping>
>>>
>>>
>>
>> --
>>
>> With Regards, Martin Taal
>>
>> Springsite/Elver.org
>> Office: Hardwareweg 4, 3821 BV Amersfoort
>> Postal: Nassaulaan 7, 3941 EC Doorn
>> The Netherlands
>> Tel: +31 (0)84 420 2397
>> Fax: +31 (0)84 225 9307
>> Mail: mtaal@springsite.com - mtaal@elver.org
>> Web: www.springsite.com - www.elver.org
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Trouble using 'embedded' annotation [message #606834 is a reply to message #85302] Wed, 30 May 2007 23:04 Go to previous message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
Right you are. Somehow that definition information got lost from my XSD
model. *sigh*

Sorry for the useless post.

Jason
Previous Topic:[Teneo] Cannot override EntityMapper
Next Topic:[Teneo] Cannot override EntityMapper
Goto Forum:
  


Current Time: Thu Jan 21 15:10:38 GMT 2021

Powered by FUDForum. Page generated in 0.01938 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top