admin管理员组

文章数量:1289497

For testing purposes I'm querying the term 'test' within a table on several columns. The filter url generated looks like this:

$filter=(substringof('test',Column1) eq true)) and (substringof('test',Column2) eq true)) and (substringof('test',Column3) eq true)) ...

The query works fine until the number of columns queried exceeds 15. At this point I get the following error message:

Query failed: The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on QueryableAttribute or ODataValidationSettings.

I got around it by adding the following attribute to the api method being called:

[Queryable(
    AllowedQueryOptions = AllowedQueryOptions.All,
    AllowedFunctions = AllowedFunctions.AllFunctions,
    MaxNodeCount = 200)]

But this does not seem to play well with foreign entities. They are always null when using the expand function. I checked the resulting filter url and it does include the necessary $expand syntax.

Is there anything else I'm missing?

For testing purposes I'm querying the term 'test' within a table on several columns. The filter url generated looks like this:

$filter=(substringof('test',Column1) eq true)) and (substringof('test',Column2) eq true)) and (substringof('test',Column3) eq true)) ...

The query works fine until the number of columns queried exceeds 15. At this point I get the following error message:

Query failed: The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on QueryableAttribute or ODataValidationSettings.

I got around it by adding the following attribute to the api method being called:

[Queryable(
    AllowedQueryOptions = AllowedQueryOptions.All,
    AllowedFunctions = AllowedFunctions.AllFunctions,
    MaxNodeCount = 200)]

But this does not seem to play well with foreign entities. They are always null when using the expand function. I checked the resulting filter url and it does include the necessary $expand syntax.

Is there anything else I'm missing?

Share Improve this question asked Jul 4, 2013 at 22:28 ZiadZiad 1,0362 gold badges21 silver badges31 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 9

update your controller method with this attribute:

[EnableBreezeQuery( MaxNodeCount = 200)]

Are you sure $expand works when there is no MaxNodeCount set?

If you use WebAPI, $expand won't do anything for you, you will have response from server like:

SelectedSubItem=null

Instead, try going into your model and instead of returning

return Context.MyClass;

do this:

return Context.MyClass.Include("SelectedSubItem");

本文标签: javascriptOvercoming MaxNodeCount gt 100 limit in BreezeJSStack Overflow