OK. Main Class: Person
Joined-Subclasses of Person: Client, Supplier, Servant, Contact All my joined subclasses have a property Company, but in some the company can be null and in others not. If I leave the Company property in Person class than I will have to accept nulls in it. You can say that I should override the Company property in each class and put my restrictions there, not allowing the Company receive a null value where it shouldn't. I know I have to do things like this but I like to ensure this restrictions in my tables. If a bug in my code let the Company receive null when it shouldn't, my database restrictions will not let is go further. Now the filter: <filter name="CompanyFilter" condition="(Company_Id = :IdCompany or (Company_Id is null and not exists (Select * from TABLE_NAME where Company_Id = :IdCompany) ))" /> Look to my internal query. I have to put the right table name there. That's the reason I need the joined-subclass accepting filters. And if you ask me why I have this filter I'll have to write another big mail to you. :) Sorry if I am not clear enough. Thank you On 12 nov, 15:23, "Fabio Maulo" <[EMAIL PROTECTED]> wrote: > example ? > > 2008/11/12 CassioT <[EMAIL PROTECTED]> > > > > > Hi, > > > I really need to define a filter in a joined-subclass. What should I > > do? Why is this not possible? > > > Thank you > > -- > Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
