[Texo] @JoinTable generation for one-to-many [message #1743193] |
Tue, 13 September 2016 04:44  |
Eclipse User |
|
|
|
Hi everybody,
I'm using EMF and Texo to generate something fancy but I have a problem, I need One-To-Many relationships (with, sometimes, no containment) without JoinTable.
When I generate the Texo annotation model, it generates a JoinTable for each One-To-Many without containment. Anyway, I delete it and add my "mappedby" attribute.
But, when I use the code generation, the "@JoinTable" annotation is still being generated whereas it does not exist in my annotation model...
Any clue ?
Zach.
|
|
|
Re: [Texo] @JoinTable generation for one-to-many [message #1746850 is a reply to message #1743193] |
Sun, 06 November 2016 08:11  |
Eclipse User |
|
|
|
Hi Zach,
Late reply... I will reply anyway for reference:
There is a property of the epackage orm model annotation which controls this 'globally': UseJoinTablesForNonContainment. The default is true, but you can set it to false.
Alternatively you can annotate the ereference with a OneToMany model annotation and add/set a joincolumn in the OneToMany. This is a signal to Texo that you don't want a jointable.
Some reference docs: https://wiki.eclipse.org/Texo/ORM_JPA_Annotations_Details
Let me know if you still have any open questions (after my reply).
gr. Martin
|
|
|
Powered by
FUDForum. Page generated in 0.06352 seconds