Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [TEXO] one-to-many relation without a join table
[TEXO] one-to-many relation without a join table [message #630878] Tue, 05 October 2010 12:34 Go to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
Hi,

This goes back to
http://www.eclipse.org/forums/index.php?t=msg&th=197763& amp;start=0&S=7751083adf9c63f5ab45e02873e5e156

I have a simple one-to-many relation and would like to generate a simple
orm.xml like this:

On the one-side:

<orm:one-to-many mapped-by="project"
target-entity="ch.arenae.projectcontrolling.core.Rapport" />

On the many-side:
<orm:many-to-one name="project"
target-entity="ch.arenae.projectcontrolling.core.Project">
<orm:join-column name="P_ID"/>
</orm:many-to-one>

But instead Texo generates a join-column element on the one-side:
<orm:one-to-many mapped-by="project" name="rapporte"
target-entity="ch.arenae.projectcontrolling.core.Rapport">
<orm:order-by></orm:order-by>
<orm:order-column/>
<orm:map-key-convert></orm:map-key-convert>
<orm:join-table name="Project_rapporte"/>
<orm:cascade>
<orm:cascade-persist/>
<orm:cascade-merge/>
<orm:cascade-refresh/>
</orm:cascade>
</orm:one-to-many>

How can I get rid of this?

Best regards,
Peter
Re: [TEXO] one-to-many relation without a join table [message #630953 is a reply to message #630878] Tue, 05 October 2010 15:37 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Peter,
You can annotate this specific association to use a join column instead of a jointable, or if you want all
non-containment associations to not-use a join table add an epackage annotation and set the eattribute
useJoinTablesForNonContainment to false.
See here for info on how to set annotations for the model:
http://wiki.eclipse.org/Texo/ORM_JPA_Annotations_Details

gr. Martin

On 10/05/2010 02:34 PM, Peter Kullmann wrote:
> Hi,
>
> This goes back to
> http://www.eclipse.org/forums/index.php?t=msg&th=197763& amp;start=0&S=7751083adf9c63f5ab45e02873e5e156
>
>
> I have a simple one-to-many relation and would like to generate a simple
> orm.xml like this:
>
> On the one-side:
>
> <orm:one-to-many mapped-by="project"
> target-entity="ch.arenae.projectcontrolling.core.Rapport" />
>
> On the many-side:
> <orm:many-to-one name="project"
> target-entity="ch.arenae.projectcontrolling.core.Project">
> <orm:join-column name="P_ID"/>
> </orm:many-to-one>
>
> But instead Texo generates a join-column element on the one-side:
> <orm:one-to-many mapped-by="project" name="rapporte"
> target-entity="ch.arenae.projectcontrolling.core.Rapport">
> <orm:order-by></orm:order-by>
> <orm:order-column/>
> <orm:map-key-convert></orm:map-key-convert>
> <orm:join-table name="Project_rapporte"/>
> <orm:cascade>
> <orm:cascade-persist/>
> <orm:cascade-merge/>
> <orm:cascade-refresh/>
> </orm:cascade>
> </orm:one-to-many>
>
> How can I get rid of this?
>
> Best regards,
> Peter


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
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
Previous Topic:[Announce] EMF for GWT
Next Topic:save&load two packages in one file
Goto Forum:
  


Current Time: Fri Apr 26 22:46:32 GMT 2024

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

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

Back to the top