db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Bengtson" <e...@jpox.org>
Subject RE: Detecting inconsistencies of mapped-by declarations?
Date Thu, 07 May 2009 17:39:43 GMT

>in the XML metadata, it is possible to have multiple FCO fields, e.g.
>B.a1 and B.a2, with identical mapped-by pointing to the same field of
>the same related class, e.g. A.b. In effect this would theoretically
>mean that the FK should be shared among different associations in the
>object model. I don't think that this does make much sense.

It makes sense to me, because a1 and a2 are distinct associations, thus
different roles.

>Also it is possible to declare two fields in two different classes, e.g.
>B1.a and B2.a, with the identical mapped-by pointing to the same field
>of the same related class, e.g. A.a. That would mean that in theory two
>FKs would have to be created for the same column, pointing to different
>tables. That neither seems to make sense to me.

It makes sense to me. Same as above.

It's not common to handle these associations in relational databases, but
very common when using UML.

View raw message