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']);
有帮助吗?

解决方案

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top