>Why would you want to have two different fields for the same
>association? As far as I can see, it would always hold true that
>b.a1==b.a2. You could express that in OCL in your UML, but in most cases
>in the jdo metadata the above would be an error. You could still have
>another getter getA2() returning the same field a1 if you really want
>that behaviour implemented.

It's not the same association. There are two associations in here, and they
are probably meant to be used exclusively.

>In UML you'd have to write something like "for any b1 of type B1 and b2
>of type B2: b1.a==b2.a" in OCL to express the above. Why should we
>support implementing this using mapped-by if no database supports it?
>Also, you can of course still implement this in other ways.

Why not? We can add one column that preserves the role name(example 1) of
the association or the class name(example 2) that has the association
instance.


I think we can raise a warning if the user tries to map such situations, but
throwing an error would be a blocker for advanced usage.




Reply via email to