Using a where="" is the appropriate action here, not a discriminator.

On Fri, Sep 26, 2008 at 10:36 PM, Peter Lin <[EMAIL PROTECTED]> wrote:

>
>
> sorry for the confusing explanations. I'll attempt to explain it
> better.
>
> Here is the situation.
>
> I. I have a table in a legacy database which has existing records
> which use the concept of a discriminator. In other words, there is a
> type_code column, which has different values.
>
>
> II. I have a C# object which represents an entity. The entity maps to
> records in the table with a specific discriminator value.
>
>
> III. I only want to get the records with a specific discriminator
> value from the table like "home_address".
>
>
> IV. I have a modeling tool which generates C# classes with the
> appropriate NH attributes. Changing the code gen for the special case
> to use one of the work arounds feels like a hack to me.
>
> V. since polymorphic queries require the discriminator column to
> create the correct object instance, shouldn't it always include it in
> the select part of the sql statement?
>
> thanks for taking time to listen and respond.
>
> peter
>
> On Sep 26, 3:20 pm, "Jon Palmer" <[EMAIL PROTECTED]> wrote:
> > If you have only one class mapped then the only thing it can return is
> > that one class so why would it need the address_type_code column?
> >
> > One of your previous emails indicated the problem was returning all rows
> > from the table. I'm confused about what the problem is your tryign to
> > solve.
> >
> > Jon
> >
>
> >
>

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