breeze: sorting by navigation property fails with NHibernate and WebAPI 2

感情迁移 提交于 2019-12-24 16:29:58

问题


If I try to sort my entities by navigation property, I get the following error:

"'NHibernate.Linq.NhQueryable<CdT.EAI.Business.Entities.Request>' does not contain a definition for 'Include'"

The ODATA query is:

Requests?$orderby=Client%2FName&$top=10&$expand=Client&$inlinecount=allpages

Where Client is a navigation property of the Request entity, and Client.Name is the property displayed in the grid I'm trying to sort.

I use the latest version of breeze (1.4.7)

Can you confirm the problem ?

EDIT I just realized that if I downgrade to WEBAPI v1, then I don't get this error. It seems to occur only with WEBAPI 2...


回答1:


This is a bug. MS changed some of the OData handling in WebApi 2, and our NH support didn't change with it.

The fix is in 1.4.8 (expected to be out tomorrow). We apologize for the inconvenience.



来源:https://stackoverflow.com/questions/20562850/breeze-sorting-by-navigation-property-fails-with-nhibernate-and-webapi-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!