You can define explicit names for your foreign key relationships via the
foreign-key attribute. For example:
  <class name="Customer" table="Customer" >
    <id name="Id" column="ID">
      <generator class="guid" />
    </id>
    <property name="Name" not-null="true" />
    <set name="Addresses" cascade="all">
      <key column="CustomerID" foreign-key="FK_Customer_Address" />
      <one-to-many class="Address"/>
    </set>
  </class>

James
--
James Kovacs, B.Sc., M.Sc., MCSD, MCT
Microsoft MVP - C# Architecture
http://www.jameskovacs.com
[EMAIL PROTECTED]
403-397-3177 (mobile)


On Thu, Oct 2, 2008 at 5:03 PM, Victor Toni <[EMAIL PROTECTED]> wrote:

>
> Hi All,
>
> is it possible to influence the naming of foreign keys / constraints?
> These would "look better" if one could provide a more meaningful name
> than FKxxxxxxxxxxxx ...
>
> Kindest regards,
> Victor
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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