What is the maximum length of an Xpath that can be used in a datagrid

We have a datagrid that has a long Xpath with many 'or' statements. On opening the datagrid we get the following error: ERROR - ConnectionBus_Retrieve: JDBCDataStore::execRetrieveQuery failed with SQLState: S0001 Message: Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries. What is the maximum length that can be used for the Xpath?
1 answers

You can't make a translation from XPath to SQL that easily so you can't say what the maximum length of XPath is as it does not translate directly to a certain SQL length. It will also depend on the database you're using. The advice they're giving you is still valid though, try to rewrite your logic, for example add some extra enum to your entity to avoid having that many OR's on a datagrid, that would certainly help performance on retrieval as well.