I think this is where filters come into play? On Fri, Sep 26, 2008 at 9:31 PM, Jon Palmer <[EMAIL PROTECTED]>wrote:
> > Can't you just specify a Where clause in the definition of the single > class mapping. > > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Peter Lin > Sent: Friday, September 26, 2008 11:29 AM > To: nhusers > Subject: [nhusers] Re: Discriminator bug > > > > the reason is simple. what if I'm reading data from an existing > database, which uses the concept of a discriminator with > address_type_code. what if the address table has entries with > different address_type_code values? > > If I only want to get a specific type of address from the database and > I don't have a subclass, NHibernate wouldn't return the correct > result. It would return all rows, instead of just the rows with the > specific address_type_code. > > I just looked at the release notes for NH 2.0 and it looks like this > scenario is supported. > > Added [ Table per subclass, using a discriminator ] Support to > Nhibernate > > http://ayende.com/Blog/archive/2008/03/31/NHibernate-2.0-Alpha-is-out.as > px > > unfortunately, I can't upgrade to NH 2.0. I understand NH might not > consider this a valid use case, but I definitely consider it a valid > use case. > > peter > > On Sep 26, 11:20 am, "Fabio Maulo" <[EMAIL PROTECTED]> wrote: > > Why you think that it is a bug ?If a class don't have a <subclass> > (mean you > > have only one value for discriminator and that mean don't have nothing > to > > discriminate), why NH must add the discriminator clause ? > > > > 2008/9/26 Peter Lin <[EMAIL PROTECTED]> > > > > > > > > > -- Tuna Toksöz Typos included to enhance the readers attention! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
