Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Teneo] single ref table for many-to-many
| | | | | |
Re: [Teneo] single ref table for many-to-many [message #79368 is a reply to message #79354] |
Wed, 11 April 2007 17:39 |
Mark Geib Messages: 432 Registered: July 2009 |
Senior Member |
|
|
Martin,
Did this. But I see no difference in the mapping file after re-generating.
In the ecore file I find the following:
<eStructuralFeatures xsi:type="ecore:EReference" name="services"
upperBound="-1"
eType="#//Service" eOpposite="#//Service/contacts">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@ManyToMany(indexed=false)"/>
</eAnnotations>
</eStructuralFeatures>
and...
<eStructuralFeatures xsi:type="ecore:EReference" name="contacts"
upperBound="-1"
eType="#//Contact" eOpposite="#//Contact/services">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@ManyToMany(indexed=false)"/>
</eAnnotations>
</eStructuralFeatures>
but the mapping file contains
<list name="services" lazy="true"
cascade="merge,persist,save-update,lock,refresh" table="`contact_service`">
<key update="true">
<column name="`contact_e_id`" not-null="true" unique="false"/>
</key>
<list-index column="`contact_services_idx`"/>
<many-to-many entity-name="Service" unique="false">
<column name="`service_e_id`" not-null="true" unique="false"/>
</many-to-many>
</list>
and ...
<list name="contacts" lazy="true"
cascade="merge,persist,save-update,lock,refresh" table="`service_contact`">
<key update="true">
<column name="`service_e_id`" not-null="true" unique="false"/>
</key>
<list-index column="`service_contacts_idx`"/>
<many-to-many entity-name="Contact" unique="false">
<column name="`contact_e_id`" not-null="true" unique="false"/>
</many-to-many>
</list>
Which looks like two tables will be used as before.
Thanks,
Mark.
|
|
|
Re: [Teneo] single ref table for many-to-many [message #79383 is a reply to message #79368] |
Wed, 11 April 2007 17:48 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Mark,
Did you regenerate the java source code? This is required after an ecore change (the ecore is not
read from the ecore file but from the runtime generated EPackage class).
gr. Martin
Mark wrote:
> Martin,
>
> Did this. But I see no difference in the mapping file after re-generating.
>
> In the ecore file I find the following:
>
> <eStructuralFeatures xsi:type="ecore:EReference" name="services"
> upperBound="-1"
> eType="#//Service" eOpposite="#//Service/contacts">
> <eAnnotations source="teneo.jpa">
> <details key="appinfo" value="@ManyToMany(indexed=false)"/>
> </eAnnotations>
> </eStructuralFeatures>
>
>
> and...
>
> <eStructuralFeatures xsi:type="ecore:EReference" name="contacts"
> upperBound="-1"
> eType="#//Contact" eOpposite="#//Contact/services">
> <eAnnotations source="teneo.jpa">
> <details key="appinfo" value="@ManyToMany(indexed=false)"/>
> </eAnnotations>
> </eStructuralFeatures>
>
> but the mapping file contains
>
> <list name="services" lazy="true"
> cascade="merge,persist,save-update,lock,refresh" table="`contact_service`">
> <key update="true">
> <column name="`contact_e_id`" not-null="true"
> unique="false"/>
> </key>
> <list-index column="`contact_services_idx`"/>
> <many-to-many entity-name="Service" unique="false">
> <column name="`service_e_id`" not-null="true"
> unique="false"/>
> </many-to-many>
> </list>
>
>
> and ...
>
> <list name="contacts" lazy="true"
> cascade="merge,persist,save-update,lock,refresh" table="`service_contact`">
> <key update="true">
> <column name="`service_e_id`" not-null="true"
> unique="false"/>
> </key>
> <list-index column="`service_contacts_idx`"/>
> <many-to-many entity-name="Contact" unique="false">
> <column name="`contact_e_id`" not-null="true"
> unique="false"/>
> </many-to-many>
> </list>
>
>
>
> Which looks like two tables will be used as before.
>
> Thanks,
> Mark.
>
--
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: [Teneo] single ref table for many-to-many [message #604615 is a reply to message #79354] |
Wed, 11 April 2007 17:39 |
Mark Geib Messages: 432 Registered: July 2009 |
Senior Member |
|
|
Martin,
Did this. But I see no difference in the mapping file after re-generating.
In the ecore file I find the following:
<eStructuralFeatures xsi:type="ecore:EReference" name="services"
upperBound="-1"
eType="#//Service" eOpposite="#//Service/contacts">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@ManyToMany(indexed=false)"/>
</eAnnotations>
</eStructuralFeatures>
and...
<eStructuralFeatures xsi:type="ecore:EReference" name="contacts"
upperBound="-1"
eType="#//Contact" eOpposite="#//Contact/services">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@ManyToMany(indexed=false)"/>
</eAnnotations>
</eStructuralFeatures>
but the mapping file contains
<list name="services" lazy="true"
cascade="merge,persist,save-update,lock,refresh" table="`contact_service`">
<key update="true">
<column name="`contact_e_id`" not-null="true" unique="false"/>
</key>
<list-index column="`contact_services_idx`"/>
<many-to-many entity-name="Service" unique="false">
<column name="`service_e_id`" not-null="true" unique="false"/>
</many-to-many>
</list>
and ...
<list name="contacts" lazy="true"
cascade="merge,persist,save-update,lock,refresh" table="`service_contact`">
<key update="true">
<column name="`service_e_id`" not-null="true" unique="false"/>
</key>
<list-index column="`service_contacts_idx`"/>
<many-to-many entity-name="Contact" unique="false">
<column name="`contact_e_id`" not-null="true" unique="false"/>
</many-to-many>
</list>
Which looks like two tables will be used as before.
Thanks,
Mark.
|
|
|
Re: [Teneo] single ref table for many-to-many [message #604620 is a reply to message #79368] |
Wed, 11 April 2007 17:48 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Mark,
Did you regenerate the java source code? This is required after an ecore change (the ecore is not
read from the ecore file but from the runtime generated EPackage class).
gr. Martin
Mark wrote:
> Martin,
>
> Did this. But I see no difference in the mapping file after re-generating.
>
> In the ecore file I find the following:
>
> <eStructuralFeatures xsi:type="ecore:EReference" name="services"
> upperBound="-1"
> eType="#//Service" eOpposite="#//Service/contacts">
> <eAnnotations source="teneo.jpa">
> <details key="appinfo" value="@ManyToMany(indexed=false)"/>
> </eAnnotations>
> </eStructuralFeatures>
>
>
> and...
>
> <eStructuralFeatures xsi:type="ecore:EReference" name="contacts"
> upperBound="-1"
> eType="#//Contact" eOpposite="#//Contact/services">
> <eAnnotations source="teneo.jpa">
> <details key="appinfo" value="@ManyToMany(indexed=false)"/>
> </eAnnotations>
> </eStructuralFeatures>
>
> but the mapping file contains
>
> <list name="services" lazy="true"
> cascade="merge,persist,save-update,lock,refresh" table="`contact_service`">
> <key update="true">
> <column name="`contact_e_id`" not-null="true"
> unique="false"/>
> </key>
> <list-index column="`contact_services_idx`"/>
> <many-to-many entity-name="Service" unique="false">
> <column name="`service_e_id`" not-null="true"
> unique="false"/>
> </many-to-many>
> </list>
>
>
> and ...
>
> <list name="contacts" lazy="true"
> cascade="merge,persist,save-update,lock,refresh" table="`service_contact`">
> <key update="true">
> <column name="`service_e_id`" not-null="true"
> unique="false"/>
> </key>
> <list-index column="`service_contacts_idx`"/>
> <many-to-many entity-name="Contact" unique="false">
> <column name="`contact_e_id`" not-null="true"
> unique="false"/>
> </many-to-many>
> </list>
>
>
>
> Which looks like two tables will be used as before.
>
> Thanks,
> Mark.
>
--
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
|
|
| | | | | | | |
Goto Forum:
Current Time: Sat Nov 09 05:11:02 GMT 2024
Powered by FUDForum. Page generated in 0.06693 seconds
|