I know, that this is a bad design, but we also use a legacy database. Thanks for your help!
On 1 Jul., 12:04, Stefan Steinegger <stefan.steineg...@bluewin.ch> wrote: > You should actually avoid this. > > If have to cope with a legacy database, use property-ref: > > class Class1 > { > //... > public Guid BusinessId { get; set; } > > } > > class Class2 > { > //... > public MyClass1 { get; set; } > > } > > <class name="Class2" table="TABLE2"> > <!-- ... --> > <many-to-one > name="MyClass1" > class="Class1" > property-ref="BusinessId" > column="MyTAB1" /> > </class> > > On 1 Jul., 08:40, Maik <macgyver...@googlemail.com> wrote: > > > Hi folks, > > > I have a question, because I couldn't find it by flying through the > > manual and google. > > > How do I map a relation on a UniqueKey in the foreign Table? > > > I mean sth. like this: > > > TABLE1: > > ID *(PK) > > BUSINESS_ID (Unique or NULL) > > NAME > > > TABLE2: > > ID *(PK) > > MY_TAB1 (FK to TABLE1 by BUSINESS_ID) > > INFORMATION > > > Thanks for your help > > > Regards, > > Maik > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---