If you ask for the ABSTRACT base class only, you won't get any records...

Unless what you are saying is that you don't want to load the objects... in
which case you can execute the query with Enumerable() instead of List() and
you'll get uninitialized proxies.

    Diego


On Wed, Sep 1, 2010 at 12:07, Nick Kirkes <[email protected]> wrote:

> I am currently mapping an object graph using the table-per-subclass
> pattern, specifically <joined-subclass> for concrete implementations
> of an abstract base class.'
>
> For example, let's use:
>
> Dog : Animal
> Cat : Animal
>
> with the following mapping:
>
> <class name="Animal" abstract="true">
>   ...
>   <joined-subclass name="Dog" table="Dogs">...</joined-subclass>
>   <joined-subclass name="Cat" table="Cats">...</joined-subclass>
> </class>
>
> Another developer on our team brought up the issue that a query to
> grab a collection of the base class Animal will instigate a series of
> Left Outer Joins to the various subclasses.  This causes a few
> problems for us that can be worked around but it's a pain.  Is there a
> way to tell NHibernate to not join those classes when we're simply
> asking for the base class?
>
> Thanks in advance,
> Nick
>
> --
> 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