What type of collection is Children. How are you mapping the relationship and how is it represented in code (IList<Children> I assume?).
Other than asking for help here (which you have done), the best place would be to download the Linq2NH source and look through the tests. I will probably be able to look at it this later today as I was planning on using a very similar query on a project I am working on anyways Chris On Wed, Aug 12, 2009 at 2:57 AM, Ricardo Peres <[email protected]> wrote: > > Hi, > > I have made this answer days ago, but no one answered... Here I go > again. I can't run this query: > > var lll = (from l in session.Linq<SomeClass>() > where l.Children.Count > > 0 > select l).ToList(); > > If I use Any, it works: > > var lll = (from l in session.Linq<SomeClass>() > where l.Children.Any() == > true > select l).ToList(); > > My mappings are correct, they are quite simple and I can do all > operations perfectly. I basically have an Id, a Parent and a Children > properties, I am mapping a parent-child relationship. > > The exception I get is: > > QueryException: could not resolve property: Children.Id of:SomeClass > > Any ideas? Where can I get more support for LINQ to NHibernate? > > Thanks, > > Ricardo Peres > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
