[Teneo] many to many relations with java-annotations [message #114387] |
Mon, 10 March 2008 07:28  |
Eclipse User |
|
|
|
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 12:10  |
Eclipse User |
|
|
|
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 12:10  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.05536 seconds