I have an nhibernate xml class (called class1) with the following property:
<many-to-one name="Rank" class="RankColourScheme" column="Rank_"
property-ref="Rank" not-null="true" fetch="join"/>
The column Rank_ is not the primary key column.
When I use nhibernate to generate the sql script to create the tables, the SQL line is:
alter table dbo.Class1_ add constraint FK_Rank foreign key (Rank_)
references dbo.RankColourScheme_
This line fails, because the constraint isn't referencing the column.
The actual sql should be:
alter table dbo.Class1_ add constraint FK_Rank foreign key (Rank_)
references dbo.RankColourScheme_ (Rank_)
Any idea what I am doing wrong with my xml?
Thanks in advance,
Nadia