Hello,

How can i map kind of relation?

Class Wheel
{
  int id;
  Car Owner;
}

Class Car
{
  int id;
  Wheel Wheel1;
  Wheel Wheel2;
  Wheel Wheel3;
  Wheel Wheel4;
}

I don't want to put wheels into a collection.

I tried this fluentmapping but Wheelmap.Owner comes always null :

Class WheelMap : ClassMap<Wheel>
{
 Id(x=>x.Id);
 References(x=>x.Owner);
}

Class CarMap : ClassMap<Car>
{
  Id(x=>x.Id);
  References(x=>x.Wheel1).Cascade.All();
  References(x=>x.Wheel2).Cascade.All();
  References(x=>x.Wheel3).Cascade.All();
  References(x=>x.Wheel4).Cascade.All();
}

Answers with xml mapping welcome aswell

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