Hello everyone,

I've got a 1:1 Association, like a Customer and its Address. In the object model, the 
Address should be navigable from the Customer, but not the other way round.

The existing database model has got a customer_id foreign key pointing from the 
Address to the primary id of the Customer, instead of the maybe more usual approach of 
pointing an address_id foreign key from the Customer to the primary id of the Address.

This should be no problem, because when navigation in the object model from the 
Customer to its Address, in both cases there is only one simple select statement 
needed to find the associated Address.

Unfortunately however, I did not find out how to define the association with an 
"inverse foreign key" in the ODMG descriptor ("repository_user.xml").

According to the repository.dtd, the reference descriptor element only allows 
foreignkey sub-elements but not inverse-foreignkey sub-elements. The 
inverse-foreignkey element can only be child of a collection-descriptor, but that is 
not what I want (1:1 associations have no need for a collection).

Is there anything I can do in order to allow this?

Regards,

Andreas

BTW: With EJB Entity Beans and JBoss this "decoupling" of the data model navigation 
direction from the direction of the foreign key is possible.

______________________________________________________________________________
Nachrichten, Musik und Spiele schnell und einfach per Quickstart im 
WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to