Hi guys,
How can I do to set NULL in a foreign key column? I've got 2 Class, Like
this:
Person
{
...
public virtual Profession profession {get; set;}
}
PersonMap
{
...
References(x => x.profession)
.Cascade.All()
.Nullable();
}
Profession
{
...
public virtual IList<Person> people {get; set;}
}
ProfessionMap
{
...
HasMany(x => x.people)
.Inverse()
.KeyNullable();
}
When I register a Person without a Profession, the register have a foreign
key that references to Null register in Professional table.
I want that the register Person without a Profession to be Null in
profession_id....
--
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.