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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to