Beginner |
|
Joined: Fri Sep 08, 2006 2:55 am Posts: 21
|
I've got a mapping question, related to NHibernate 1.2.
Say I have TableA associated with ClassA and TableB associated with ClassB.
The relationship between ClassA and ClassB is one to one but for various reasons I can't give the two tables the same primary key value so I use <many-to-one unique="true".../> and so the primary key of TableB becomes a foreign key in TableA.
At some point I realise my design is flawed and ClassB should reference ClassA.
My question is thus can I do this without changing my database design?
The only way I can see to do it is to change things around so that the primary key of TableA becomes a foreign key in TableB.
|
|