[Texo] ORM.xml generation for bi-directional refs [message #742333] |
Thu, 20 October 2011 12:01 |
R. Oldenburg Messages: 24 Registered: September 2011 |
Junior Member |
|
|
Hi all,
I am very excitedly using texo for the last few days.
Creating an orm.xml from a given ecore works like a charm.
Great!
But now to my current problem:
I tried to create a bi-directional 1:n relation between two classes.
I used two EReferences refering from one class to the other which have each other as their EOpposite.
Consider the following Example:
Class "Content" Class "Module"
[some content attributes...] [some module attributes...]
EReference "module" ------------------------------> (0..1)
(0..*) <------------------------------- EReference "contents"
I would expect that the generated orm.xml would simply contain one additional column for CONTENT. In fact it does. But there is also a newly created join-table for MODULE_CONTENTS which contains the same relations.
I would expect the usage of the "mapped-by"-attribute in the "reverse"-relation instead of saving the key-mappings redundantly in another join-table...
The situation gets even worse, when creating a n:m relation. Then there are two join-tables (CONTENT_MODULE and MODULE_CONTENT) redundantly containing the relation info. And again I can manually edit orm.xml and do some "reverse" settings on one side to get only one join-table...
I cannot believe that I am the first one encountering such problems...
So what is it that am I missing?
Thanks in advance,
R. Oldenburg
[Updated on: Thu, 20 October 2011 14:38] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02877 seconds