Overcoming MaxNodeCount> 100 Limit in BreezeJS

For testing purposes, I request the term "test" in a table on multiple columns. The generated filter URL is as follows:

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

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

Request error: node account limit exceeded 100. to increase the limit, set the MaxNodeCount property to QueryableAttribute or ODataValidationSettings.

I went 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 work very well with foreign objects. When using the expand function, they are always zero. I checked the resulting filter url and it includes the required $ expand syntax.

Is there anything else I'm missing?

+4
source share
2 answers

update your controller method with this attribute:

[EnableBreezeQuery (MaxNodeCount = 200)]

+8
source

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

If you use WebAPI, $ expand will not do anything for you, you will have a response from the server, for example:

 SelectedSubItem=null 

Instead, try logging into your model and instead return

 return Context.MyClass; 

do the following:

 return Context.MyClass.Include("SelectedSubItem"); 
+1
source

Source: https://habr.com/ru/post/1489805/


All Articles