Where have you said it's StaffID?
HasMany(x => x.Staff)
.Inverse()
.Cascade.All()
.KeyColumnNames.Add("StaffID");
Or look at overriding the
conventions<http://wiki.fluentnhibernate.org/show/Conventions>
.
On Sat, Apr 11, 2009 at 10:38 AM, MalcolmS <[email protected]> wrote:
>
>
> Hi,
>
> I have a one to many relationship with the following config
>
> HasMany(x => x.Staff)
> .Inverse()
> .Cascade.All();
>
> But I get a collection failed to initialize error.
>
> Dont I have to specify the foreignkey here, examples I found do
> not????
>
> How does it know which is the foreign key?
>
> Looking closer at the exception the sql is trying to use field
> Staff_id when I have said it is StaffID??
>
> Malcolm
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" 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/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---