Print Page | Close Window

EntityQueryClause Limit

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1535
Printed Date: 28-Mar-2025 at 5:40am


Topic: EntityQueryClause Limit
Posted By: sloppy
Subject: EntityQueryClause Limit
Date Posted: 28-Oct-2009 at 8:43pm
I've been having a "Index was outside the bounds of the array" exception when trying use an EntityQuery with 73 clauses all joined with the OR operator.

Is there a limit on the number of EntityQueryClause you can add to an EntityQuery?



Replies:
Posted By: kimj
Date Posted: 29-Oct-2009 at 3:50pm
There isn't a limit on the number of clauses per se, but there can be a problem with the complexity of the resulting query.  In this case the exception is thrown by the DataTable when the EntityQuery is run against cache.  If you don't need to execute the query against cache you can set the QueryStrategy to DataSourceOnly. 



Print Page | Close Window