Hi all,
I understand that you can use <composite-element> to map table's column from the join-table to either ends of the many-to-many relationship. But approach will only give either end entity a one-to-many relationship to the components that contains data collected from the join-tables. What I really want is to have properties of one ends of the many-to-many relationship, to be automatically load from the join-table given the opposite end of the relationship. For example,
A(x,y,z)*<-->*B => A<-*AB(x,y,z)*->B
so if 'a' is an instant of A, and 'b' is an instant of B. And a<-->b are links, i.e. associated, then I want a's properties to be automatically loaded
e.g. A.x==AB.x; A.y==AB.y; A.z==AB.z given instant of A and B are associated.
A real world implication is, having a Code entity that has many-to-many relationship with Dictionary entity. Code has id and image properties, where image is being store in the join-table. So if instance of Code is assinged with an instance of Dictionary, then automatically the image property of Code will be load from the associated row and column that reflex the instance of Code and Dictionary association, i.e. or assignment.
Thanks in advance for any help or ideas,
--danny
|