|
Re: [TEXO] JPA Foreign Key [message #869790 is a reply to message #869784] |
Fri, 04 May 2012 10:05 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Gary,
Using an annotations model you can annotate the model which will be control the code generation:
http://wiki.eclipse.org/Texo/ORM_JPA_Annotations_Details
gr. Martin
On 05/04/2012 11:59 AM, Gary Godfrey wrote:
> Hi,
>
> Using TEXO to generate JPA annotated code. In the database the foreign key linking Applicant to Application is called
> 'applicant_id', using default JPA behaviour to name the index.
> Is there a way to populate the @JoinColumns annotation when the Java code is generated from the ecore model?
>
> e.g.
>
>
> public class Application extends JPAIdentifier
> {
> /**
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> @IndexedEmbedded
> @OneToMany(cascade =
> { CascadeType.ALL }, targetEntity = Applicant.class)
> @OrderColumn()
> @JoinColumns(
> { @JoinColumn() })
> private List<Applicant> applicant = new ArrayList<Applicant>();
>
>
>
>
> Thanks,
> Gary
--
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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.03255 seconds