QBSelect isin limit

In servoy 7.4.9 I see that the array given for isin in a QBSelect is limited at 200 values. When the length of the array is bigger, an error occurs: QueryFunction cannot be cast.

I’ve used sub queries successfully in the past.

var q = databaseManager.createSelect(xxx)
q.result.add(q.column.name_column)

var r = databaseManager.createSelect(xxx)
q.result.add(q.column.other_column)
q.where.add(q.column.name_column.isin(q)

At least that’s from memory… q should only return one row.

The number of values is not limited to 200, with many in-values Servoy will generate a different query but will still work.
The exception you see does not occur on the latest Servoy.

Rob

rgansevles:
The number of values is not limited to 200, with many in-values Servoy will generate a different query but will still work.
The exception you see does not occur on the latest Servoy.

Rob

So this behavior was present in previous versions of Servoy, like 7.4.9?
When I limited the length of array to 200 it didn’t throw this exception anymore. So I used an sql string for the query and it worked.

joe26:
I’ve used sub queries successfully in the past.

var q = databaseManager.createSelect(xxx)
q.result.add(q.column.name_column)

var r = databaseManager.createSelect(xxx)
q.result.add(q.column.other_column)
q.where.add(q.column.name_column.isin(q)

At least that’s from memory… q should only return one row.

.isin can have as parameter a query or values. In my case are values as array and are more than 200.

ionelioras:
So this behavior was present in previous versions of Servoy, like 7.4.9?

I don’t know exactly in which version, but do try the latest and greatest.

Rob