Re: [OJB-developers] Mapping associations.
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-02-27 13:49:08
|
Hi Charles & Fernando, Carles Rico wrote: > Hello, > > We are testing objectbridge, for we intend to use it in our aplication. thanks, for your interest. > We have some questions about > the mapping associations. We need to express an association ( for > instance 1:n or 1:1 ) between two fields which are not primary keys. > Can I do this with ObjectBridge? If so, how? Depends! OJB automatically maps foreign keys (in the detail) on primary keys (in the master table). OJB does not check if a field is a primary key in the database. It is sufficient to declare it as PK in the xml repository. So, if it is safe to use your non-PK column as a PK column (i.e. its values are unique accross the table) it will be possible to use OJB for this scenario. Are you going to implement > this in the future? There have been no request in this direction until now. I don't think that it will get high priority on the todo list as this situation clearly violates basic ER design principles. > In case there > was need for it, we would be willing to help you with the implementation. > thanks for your offer to help! If you implement this kinf of thing I will integrate it into the distribution, thanks, Thomas > Best regards, > > > Carles & Fernando. > > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > |