>
> Looking at it from another angle, would the following class (with a
> suitable one-to-one mapping between PocoA and PocoB; and a suitable
> one-to-one mapping between PocoA and PocoC) generate a single-level
> SELECT statement and populate correctly from a single returned row?
>
>    public class PocoA
>    {
>        public virtual long ID { get; set; }
>        public virtual PocoB Foo { get; set; }
>        public virtual PocoC Bar { get; set; }
>    }
>

Yes, using fetch="join"


>
> If so, would the same SELECT and population occur if PocoA did not
> know about PocoB and only PocoB's mapping defined the one-to-one to
> PocoA (i.e. if PocoB was in a different assembly)?
>

How would PocoA look?


>
> If so, could NHibernate infer a one-to-one relationship between PocoB
> and PocoC, given that both have a defined one-to-one mapping to the
> same field on PocoA?
>
>
 No, you can't map two properties to the same field.

  Diego

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