If they are related and you want to tream them as such, make them related in
the model.
You say "the IDs are the same, which means there is an obvious left-join
that can be made" but provide no way for NH to know that.
Start from scratch. Read the docs. Create a rich model. Map it. Query. Let
NH do its job.

    Diego


On Sun, Aug 8, 2010 at 18:35, jimbobmcgee <[email protected]>wrote:

> Apologies for the delay; have been away.  Forget the previous
> examples, I've managed to narrow this down to its purest sense now.  I
> know I should be able to do the following:
>
>    static void Main()
>    {
>        ISession session = NHUtils.GetSession();
>
>        var theCollection = new Dictionary<Type, object>() {
>            { typeof(PocoA), null },
>            { typeof(PocoB), null },
>            { typeof(PocoC), null },
>            { typeof(PocoD), null }
>        };
>
>        int id = 12345;
>        foreach (Type t in theCollection.AllKeys) {
>            theCollection[t] = session.Get(t, id);
>        }
>    }
>
> Now, can I do it in such a way that it does not need to make four
> round-trips to populate theCollection?
> Because the IDs are the same, which means there is an obvious left-
> join that can be made, is there any way I can use fetch="join"
> semantics?
> Can I dynamically generate an ICriteria or the HQL for an IQuery?
>
> The point is that the PocoA/B/C/D are not aware that they are related
> to each other, but the consuming code is aware.
>
> --
> 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.

Reply via email to