Question

Breeze js paging gives wrong number of entities as the result when querying with expand properties, without expanding it works fine with .take and .skip. Can someone plz tell me why that is and what can I do to get the top 10 entries correctly.

My Query :

 var query = new breeze.EntityQuery().from('Student')
                            .where(profile.firstName', 'eq', 'Kate')
                            .skip(10)
                            .take(10)
                            .inlineCount()
                            .expand(['enrollments.batch, profile']);
Était-ce utile?

La solution

Your expand looks wrong. I think it should be either

  .expand(['enrollments.batch', 'profile']);   // as an array with 2 elements

or

  .expand('enrollments.batch, profile'); // as a single ',' delimited string
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top