PsQuery with "list contains" where condition?

CapableObjects Forums SupportForum PsQuery with "list contains" where condition?


This topic contains 0 replies, has 1 voice, and was last updated by  krilbe 12 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #5026 Score: 0


    I have a class M with detail objects of class D. In a PSQuery, I need to extract those D objects that belong to any of several M objects. I can put the M objects to look for in a HashSet<M>, List<M>, IObjectList or IEcoList<M> (whatever is required).

    I then need to do something like this:

    var allMyMs = ...; // IEcoList<M>, IObjectList, what?
    var result = EcoSpace.PSQuery<D>()
        .Where(d => d.Attr == someValue && allMyMs.Contains(d.Master))

    When I try this (with allMyMs as an IEcoList<M>), the ToList() call that executes the query chokes:

    Exception thrown: ‘Eco.Exceptions.EcoInternalErrorException’ in Eco.Persistence.dll
    Additional information: Internal Error: Arg 0 for Includes has no Query

    Any ideas? Please focus on the main objective: to retrieve all D:s that belong to a set of M:s, and also matches a couple of simple attribute criteria.

    • This topic was modified 12 months ago by  krilbe. Reason: Clarification and added some text
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Comments are closed.