Andy Jefferson wrote: >> Should the implementation throw an error in such situations, warning the >> user of the erroneous metadata? >> > > Shared FK relations are a perfectly valid thing to have IMHO > http://www.datanucleus.org/products/accessplatform_1_1/jdo/orm/one_to_many_collection.html#shared_fk > You could have the same as that example with 1-1 and a discriminator for > determining the relation. > Sorry I had put it too general: what I really had in mind is that an FK (value) in the same table row would be shared by two different associations in the object model.
Since that datanucleus extension is about an additional relation-discriminator to discern the two associations in a join table, this is not the case in your example. I take it that this only works for join tables, and not for single-FK mapping? > The place of an ORM spec is to standardise particular relation types, not to > prevent other ones. > > > -- ____________________________________________________________________ artnology GmbH - Milastraße 4 - 10437 Berlin - Germany Geschäftsführer: Ekkehard Blome (CEO), Felix Kuschnick (CCO) Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376 UST-Id. DE 217652550
