I'll rephrase it another way.

shouldn't the select statement always include address_type_code
column, since it is the discriminator column?  We've established the
discriminator column isn't a property, but it needs to be included in
the select statement so that polymorphic queries work correctly. this
doesn't mean including address_type_code in the where clause.

the way NHibernate and Hibernate work today is it adds the
discriminator column as the last column in the select clause so that
it can handle polymorphic queries properly and create an instance of
the correct object.

peter

On Sep 26, 2:54 pm, "Jon Palmer" <[EMAIL PROTECTED]> wrote:
> I disagree, the current implementation is exactly right.
>
> In a normal situation your table has only data that is mapped in NHibernate 
> (ie all the values of the discriminator column are mapped to some class). Now 
> if I perform a query for the base class I DON'T want NHibernate to put in an 
> spurious where clause which will be true for all rows in the table.
>
> I think its right that it works the way it does and you have to employ a work 
> around in your legacy data case.
>
> 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