Actually, if Wheel has a batch-size of 4, there aren't any more queries. Diego
On Thu, Apr 22, 2010 at 14:34, nadav s <[email protected]> wrote: > not puting them into a collection will be un-optimized as it'll cause 4 > selects instead of one returning all the wheels. You can put it in a > protected collection property and expose the 4 public properties > > On Thu, Apr 22, 2010 at 7:21 PM, Datvi <[email protected]> wrote: > >> 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]<nhusers%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/nhusers?hl=en. >> >> > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > -- 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.
