當我在一個查詢中調用inlineCount()時,這兩個查詢都由相關屬性進行排序並執行查詢,inlineCount等於傳遞給take() 。例如,下面的查詢返回正確的inlineCount:帶有take(),orderBy和inlineCount的Breezejs錯誤
testFunc = function() {
EntityQuery.from('Residents')
.take(10)
.inlineCount()
.using(manager).execute()
.then(function (data) {
console.log(data.inlineCount, data); //logs correct value
});
}
但是當我添加訂貨到我的查詢,如下所示:
testFuncOrdering = function() {
EntityQuery.from('Residents')
.orderBy('user.firstName')
.take(10)
.inlineCount()
.using(manager).execute()
.then(function (data) {
console.log(data.inlineCount, data); //logs 10
});
}
的inlineCount爲10,或任何我通過採取
這裏是我的控制器操作:
[HttpGet]
public IQueryable<UserDetail> Residents()
{
return _context.Context.UserDetails
.Where(x => _aptIds.Contains(x.User.UserDetail.ApartmentComplexId))
.Where(x => x.Discriminator == UserDetail.Resident);
}
這個bug似乎相似到一個在1.4.0中修復的bug,但是不是爲inlineCount得到null/undefined,我得到了take值。如有必要,我可以提供我的元數據。任何幫助表示讚賞,謝謝。