Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] many to many relations with java-annotations
[Teneo] many to many relations with java-annotations [message #114387] Mon, 10 March 2008 11:28 Go to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

Hi Martin,

i want to create a n:m relation table by using annotations in some given
java- interfaces.
So i guess i have to use the @ManyToMany tag from the javax.persistence lib?
Unfortunaly i'm using Java SE and the javax.persistence package doesn't
seem to be part of it.
Is there another way to create n:m tables with java-annotations? Or did
i just overlooked the lib anywhere else?

Thanks for your advice,
Mario
Re: [Teneo] many to many relations with java-annotations [message #114440 is a reply to message #114387] Mon, 10 March 2008 16:10 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Mario,
With Teneo the annotations are specified on model level, either in the model itself or in a separate
xml file. See here:
http://www.elver.org/hibernate/ejb3_format.html
Here is an example of specifying many-to-many in a xml schema:
http://www.elver.org/hibernate/ejb3_examples.html#mtm
this can also be done in xml on in ecore.

For jpox the same applies

As Teneo uses annotations on model level it is not required to have the javax.persistence jar. Teneo
works for both hibernate (session and entitymanager api) and jpox (persistencemanager api).

gr. Martin

user@domain.invalid wrote:
> Hi Martin,
>
> i want to create a n:m relation table by using annotations in some given
> java- interfaces.
> So i guess i have to use the @ManyToMany tag from the javax.persistence
> lib?
> Unfortunaly i'm using Java SE and the javax.persistence package doesn't
> seem to be part of it.
> Is there another way to create n:m tables with java-annotations? Or did
> i just overlooked the lib anywhere else?
>
> Thanks for your advice,
> Mario


--

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] many to many relations with java-annotations [message #615670 is a reply to message #114387] Mon, 10 March 2008 16:10 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Mario,
With Teneo the annotations are specified on model level, either in the model itself or in a separate
xml file. See here:
http://www.elver.org/hibernate/ejb3_format.html
Here is an example of specifying many-to-many in a xml schema:
http://www.elver.org/hibernate/ejb3_examples.html#mtm
this can also be done in xml on in ecore.

For jpox the same applies

As Teneo uses annotations on model level it is not required to have the javax.persistence jar. Teneo
works for both hibernate (session and entitymanager api) and jpox (persistencemanager api).

gr. Martin

user@domain.invalid wrote:
> Hi Martin,
>
> i want to create a n:m relation table by using annotations in some given
> java- interfaces.
> So i guess i have to use the @ManyToMany tag from the javax.persistence
> lib?
> Unfortunaly i'm using Java SE and the javax.persistence package doesn't
> seem to be part of it.
> Is there another way to create n:m tables with java-annotations? Or did
> i just overlooked the lib anywhere else?
>
> Thanks for your advice,
> Mario


--

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
Previous Topic:[Teneo] many to many relations with java-annotations
Next Topic:Loading a GMF diagram resource from Hibernate
Goto Forum:
  


Current Time: Wed Apr 24 20:04:47 GMT 2024

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

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

Back to the top