0
votes

We have two entities, User and Person.

public class User
{
    public int Id { get; set; }
    public string UserName { get; set; }
    public string Password { get; set; }

    public int PersonId { get; set; }
    public Person Person { get; set; }
}

and

public class Person
{
    public int Id { get; set; }

    public string FirstName { get; set; }
    public string LastName { get; set; }
}

Every user has a person, but not every person has a user.

I would like to retrieve all the persons, that aren't assigned to a user. Is there a way to do this using breeze.js?

I can't find anything on using subqueries with Breeze, but I imagine there should be some sort of 'in' clause or some way to use/make a subquery

1

1 Answers

0
votes

Updated post: 11/25/13

As of Breeze 1.4.6, 'any' and 'all' operators are now supported.

Older post

Right now there is no easy way to do this. We do plan to support 'any' and 'all' query filters in the future but we just haven't gotten to it yet. Please vote for this here.

As a workaround, in some scenarios you can query for the value of the foreign key being null or 0 but I don't think that this will work in your case, given your schema.