where cat.class = "FullName"In your case you are doing something wrong and probably you are needing subqueries from Cat c where c in (from DomesticCat dc where dc.Fat = false)
Think in OOP... from Cat c where c.Fat = false is not possible if the Cat does not have a property "Fat". The above example is something foo because from DomesticCat dc where dc.Fat = false if enough because each DomesticCat is a Cat. 2009/7/6 kelly.stuard <[email protected]> > > Hopefully someone on this list can help me out with this issue. > > Taking the normal "Cat" strategy: > * Base entity of Cat > * Descendant of WildCat > * Descendant of DomesticCat with property of Fat > > I'd like to be able to perform a query that returns all Cats that are > not Fat. Something like the following: > from Cat cat > where cat is 'DomesticCat' and cat.Fat = 0 > > However, the property of Fat does not exist on Cat; only on the > descendant class. I've tried various different ways but the only one > I've had luck with is using SQL. I'd like to stay away from that, if > possible; HQL just gives too much to give it up over something like > this. > > Hopefully someone has solved this problem before and can give some > guidance. > > Thanks, > Kelly > > > > -- 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 -~----------~----~----~----~------~----~------~--~---
