带扩展属性的Breeze js分页

问题描述 投票:0回答:1

Breeze js 分页在使用扩展属性查询时给出错误数量的实体作为结果,在不扩展的情况下,它可以与 .take 和 .skip 配合使用。有人可以告诉我这是为什么吗?我该怎么做才能正确获得前 10 名条目。

我的询问:

 var query = new breeze.EntityQuery().from('Student')
                            .where(profile.firstName', 'eq', 'Kate')
                            .skip(10)
                            .take(10)
                            .inlineCount()
                            .expand(['enrollments.batch, profile']);
pagination breeze expand
1个回答
1
投票

您的展开看起来不对。 我认为应该是

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

  .expand('enrollments.batch, profile'); // as a single ',' delimited string
© www.soinside.com 2019 - 2024. All rights reserved.