Class Person
{
int ID;
IList<Cat> cats;
}
Class Cat
{
int OwnerId;
}
how to map person cats on nhibernate fluent?
probably stupid question but i cant find the 开发者_开发百科answer..
thank you all.
How about:
public class PersonMap : ClassMap<Person>
{
Id(p => p.ID);
HasMany(p => p.Cats);
}
Assuming you have a Cats property in there somewhere of course.
精彩评论