This is the way the default NSSQLiteStoreType behaves. Iterating over an NSDictionary iterates over its keys as well.
Currently, if a dictionary is used as the value for IN in a predicate, it creates SQL: SELECT ... FROM ... WHERE (... IN ?); and produces the error could not prepare statement: near "?": syntax error.
With these changes, the SQL is: SELECT ... FROM ... WHERE (... IN (?, ?, ...));, where the bindings for ?, ?, ... are the dictionary's keys.
This is the way the default
NSSQLiteStoreType
behaves. Iterating over anNSDictionary
iterates over its keys as well.Currently, if a dictionary is used as the value for
IN
in a predicate, it creates SQL:SELECT ... FROM ... WHERE (... IN ?);
and produces the errorcould not prepare statement: near "?": syntax error
.With these changes, the SQL is:
SELECT ... FROM ... WHERE (... IN (?, ?, ...));
, where the bindings for?, ?, ...
are the dictionary's keys.