Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] single ref table for many-to-many
[Teneo] single ref table for many-to-many [message #79236] Tue, 10 April 2007 16:41 Go to next message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

Is is possible to set an option to have a single ref table created for
many-to-many relationships. Currently I see two table created for such
relationships, my DB guys would like to see just a single table for each
relationship.

I read on the Elver site that many-to-many relationships have two table
created, also a mention that if an option is set to exclude indexes a
single talble is create...

Thanks,
Mark.
Re: [Teneo] single ref table for many-to-many [message #79252 is a reply to message #79236] Tue, 10 April 2007 16:50 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Mark,
Yes Hibernate can't work with indexed many-to-many in a single join table therefore the m-t-m is
split in two o-t-m's.
To set indexed to false for the many-to-many: can you try the following annotation on the
many-to-many ereference: @ManyToMany(indexed=false).

There is a global option to set indexed to false for all one-to-many ereferences but this option is
not implemented for many-to-many. Please enter a bugzilla if this feature is also helpfull for
many-to-many.

Mark wrote:
> Martin,
>
> Is is possible to set an option to have a single ref table created for
> many-to-many relationships. Currently I see two table created for such
> relationships, my DB guys would like to see just a single table for each
> relationship.
>
> I read on the Elver site that many-to-many relationships have two table
> created, also a mention that if an option is set to exclude indexes a
> single talble is create...
>
> 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 #79266 is a reply to message #79252] Tue, 10 April 2007 17:47 Go to previous messageGo to next message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

Thanks. Does this annotation go in the mapping file or the ecore file..?

Mark.
Re: [Teneo] single ref table for many-to-many [message #79281 is a reply to message #79266] Tue, 10 April 2007 18:01 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
In the ecore file (or a separate xml), but it is only picked up when you regenerate the mapping file
(or do not use a mapping file).

gr. Martin

Mark wrote:
> Martin,
>
> Thanks. Does this annotation go in the mapping file or the ecore file..?
>
> 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 #79340 is a reply to message #79281] Wed, 11 April 2007 16:48 Go to previous messageGo to next message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

I am trying to place the annotation in my ecore file. But I know zero xml
and can
not make this work...

Do you have the acutal xml block of code, and where it should be located
in the
ecore file for me..?

Thanks again,
Mark.
Re: [Teneo] single ref table for many-to-many [message #79354 is a reply to message #79340] Wed, 11 April 2007 17:23 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Mark,
It is easier to open the ecore in the default ecore editor and then right click on the ereference
and choose add child > eannotation.
The source of the eannotation should be teneo.jpa
Then add a details entry in the eannotation (right click on it). The key of the details should be
appinfo (or value) and the Value should then be:
@ManyToMany(indexed=false)

Probably you have to add the same annotation on the other side of the eannotation.

gr. Martin

Mark wrote:
> Martin,
>
> I am trying to place the annotation in my ecore file. But I know zero
> xml and can
> not make this work...
>
> Do you have the acutal xml block of code, and where it should be located
> in the
> ecore file for me..?
>
> Thanks again,
> 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 #79368 is a reply to message #79354] Wed, 11 April 2007 17:39 Go to previous messageGo to next message
Mark Geib is currently offline Mark GeibFriend
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 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
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 #79398 is a reply to message #79383] Wed, 11 April 2007 18:00 Go to previous messageGo to next message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

Yes I did. I re-generated the model code, then right clicked on the ecore
and
created the hibernate mapping file using super-class option.

The annotation is in the effected java source for the modeled classes.

Mark.
Re: [Teneo] single ref table for many-to-many [message #79413 is a reply to message #79398] Wed, 11 April 2007 18:14 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Can you try indexed="false" instead of indexed=false?

If this works then this is a bug...

You can debug into the class DefaultAnnotator and then the method
processBidirectionalManyToManyReference. In the end of this method (after if (joinTable.getName() ==
null) the name of the jointable is set.

gr. Martin

Mark wrote:
> Martin,
>
> Yes I did. I re-generated the model code, then right clicked on the
> ecore and
> created the hibernate mapping file using super-class option.
>
> The annotation is in the effected java source for the modeled classes.
>
> 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 #79426 is a reply to message #79413] Wed, 11 April 2007 18:23 Go to previous messageGo to next message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

With the double quotes around false, the mapping file created is emtpy,
except for the header...

Mark.
Re: [Teneo] single ref table for many-to-many [message #79440 is a reply to message #79426] Wed, 11 April 2007 18:50 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hmm I have a testcase with this approach which works fine. Okay back to the old way then (without
quotes).
What happens when you debug into the DefaultAnnotator?

gr. Martin

Mark wrote:
> Martin,
>
> With the double quotes around false, the mapping file created is emtpy,
> except for the header...
>
> 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 #79456 is a reply to message #79440] Wed, 11 April 2007 18:57 Go to previous messageGo to next message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

Debugging results in the annotation working.

In order to debug I used my program which creates the dataStore and then
calls getMappingXML(). The file returned looked correct, and the resulting
database only has a single table.

Generating the mapping file manually by right clicking on the ecore file
did not work, but I will verify.

Mark.
Re: [Teneo] single ref table for many-to-many [message #79469 is a reply to message #79456] Wed, 11 April 2007 19:00 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Mark,
Hmm that's strange, can it be that the generated mapping file was not refreshed (so the change was
not visible)?

There is also a direct method in HbHelper to create the mapping file.

gr. Martin

Mark wrote:
> Martin,
>
> Debugging results in the annotation working.
>
> In order to debug I used my program which creates the dataStore and then
> calls getMappingXML(). The file returned looked correct, and the
> resulting database only has a single table.
>
> Generating the mapping file manually by right clicking on the ecore file
> did not work, but I will verify.
>
> 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 #79483 is a reply to message #79469] Wed, 11 April 2007 19:09 Go to previous message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

I can not verify that the manual method fails to generate the correct
mapping file. It looks fine now. I did however restart Eclipse prior the
test.

I would also let you know that I had a similar problem to the other thread
in this group, [Teneo] Blank hibernate.hbm.xml?, when I first tried the
manual generation method. Later on, certainly after an Eclipse restart the
process worked fine, but the first couple of times I tried the mapping
file was empty. And there was no ecore change.

Mark.
Re: [Teneo] single ref table for many-to-many [message #604580 is a reply to message #79236] Tue, 10 April 2007 16:50 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Mark,
Yes Hibernate can't work with indexed many-to-many in a single join table therefore the m-t-m is
split in two o-t-m's.
To set indexed to false for the many-to-many: can you try the following annotation on the
many-to-many ereference: @ManyToMany(indexed=false).

There is a global option to set indexed to false for all one-to-many ereferences but this option is
not implemented for many-to-many. Please enter a bugzilla if this feature is also helpfull for
many-to-many.

Mark wrote:
> Martin,
>
> Is is possible to set an option to have a single ref table created for
> many-to-many relationships. Currently I see two table created for such
> relationships, my DB guys would like to see just a single table for each
> relationship.
>
> I read on the Elver site that many-to-many relationships have two table
> created, also a mention that if an option is set to exclude indexes a
> single talble is create...
>
> 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 #604586 is a reply to message #79252] Tue, 10 April 2007 17:47 Go to previous message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

Thanks. Does this annotation go in the mapping file or the ecore file..?

Mark.
Re: [Teneo] single ref table for many-to-many [message #604590 is a reply to message #79266] Tue, 10 April 2007 18:01 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
In the ecore file (or a separate xml), but it is only picked up when you regenerate the mapping file
(or do not use a mapping file).

gr. Martin

Mark wrote:
> Martin,
>
> Thanks. Does this annotation go in the mapping file or the ecore file..?
>
> 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 #604607 is a reply to message #79281] Wed, 11 April 2007 16:48 Go to previous message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

I am trying to place the annotation in my ecore file. But I know zero xml
and can
not make this work...

Do you have the acutal xml block of code, and where it should be located
in the
ecore file for me..?

Thanks again,
Mark.
Re: [Teneo] single ref table for many-to-many [message #604612 is a reply to message #79340] Wed, 11 April 2007 17:23 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Mark,
It is easier to open the ecore in the default ecore editor and then right click on the ereference
and choose add child > eannotation.
The source of the eannotation should be teneo.jpa
Then add a details entry in the eannotation (right click on it). The key of the details should be
appinfo (or value) and the Value should then be:
@ManyToMany(indexed=false)

Probably you have to add the same annotation on the other side of the eannotation.

gr. Martin

Mark wrote:
> Martin,
>
> I am trying to place the annotation in my ecore file. But I know zero
> xml and can
> not make this work...
>
> Do you have the acutal xml block of code, and where it should be located
> in the
> ecore file for me..?
>
> Thanks again,
> 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 Go to previous message
Mark Geib is currently offline Mark GeibFriend
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 Go to previous message
Martin Taal is currently offline Martin TaalFriend
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 #604624 is a reply to message #79383] Wed, 11 April 2007 18:00 Go to previous message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

Yes I did. I re-generated the model code, then right clicked on the ecore
and
created the hibernate mapping file using super-class option.

The annotation is in the effected java source for the modeled classes.

Mark.
Re: [Teneo] single ref table for many-to-many [message #604628 is a reply to message #79398] Wed, 11 April 2007 18:14 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Can you try indexed="false" instead of indexed=false?

If this works then this is a bug...

You can debug into the class DefaultAnnotator and then the method
processBidirectionalManyToManyReference. In the end of this method (after if (joinTable.getName() ==
null) the name of the jointable is set.

gr. Martin

Mark wrote:
> Martin,
>
> Yes I did. I re-generated the model code, then right clicked on the
> ecore and
> created the hibernate mapping file using super-class option.
>
> The annotation is in the effected java source for the modeled classes.
>
> 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 #604633 is a reply to message #79413] Wed, 11 April 2007 18:23 Go to previous message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

With the double quotes around false, the mapping file created is emtpy,
except for the header...

Mark.
Re: [Teneo] single ref table for many-to-many [message #604636 is a reply to message #79426] Wed, 11 April 2007 18:50 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hmm I have a testcase with this approach which works fine. Okay back to the old way then (without
quotes).
What happens when you debug into the DefaultAnnotator?

gr. Martin

Mark wrote:
> Martin,
>
> With the double quotes around false, the mapping file created is emtpy,
> except for the header...
>
> 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 #604640 is a reply to message #79440] Wed, 11 April 2007 18:57 Go to previous message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

Debugging results in the annotation working.

In order to debug I used my program which creates the dataStore and then
calls getMappingXML(). The file returned looked correct, and the resulting
database only has a single table.

Generating the mapping file manually by right clicking on the ecore file
did not work, but I will verify.

Mark.
Re: [Teneo] single ref table for many-to-many [message #604644 is a reply to message #79456] Wed, 11 April 2007 19:00 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Mark,
Hmm that's strange, can it be that the generated mapping file was not refreshed (so the change was
not visible)?

There is also a direct method in HbHelper to create the mapping file.

gr. Martin

Mark wrote:
> Martin,
>
> Debugging results in the annotation working.
>
> In order to debug I used my program which creates the dataStore and then
> calls getMappingXML(). The file returned looked correct, and the
> resulting database only has a single table.
>
> Generating the mapping file manually by right clicking on the ecore file
> did not work, but I will verify.
>
> 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 #604646 is a reply to message #79469] Wed, 11 April 2007 19:09 Go to previous message
Mark Geib is currently offline Mark GeibFriend
Messages: 432
Registered: July 2009
Senior Member
Martin,

I can not verify that the manual method fails to generate the correct
mapping file. It looks fine now. I did however restart Eclipse prior the
test.

I would also let you know that I had a similar problem to the other thread
in this group, [Teneo] Blank hibernate.hbm.xml?, when I first tried the
manual generation method. Later on, certainly after an Eclipse restart the
process worked fine, but the first couple of times I tried the mapping
file was empty. And there was no ecore change.

Mark.
Previous Topic:[Teneo] Blank hibernate.hbm.xml?
Next Topic:[Teneo]Custom primary key column is not being defined correctly.
Goto Forum:
  


Current Time: Thu Mar 28 15:54:43 GMT 2024

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

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

Back to the top