Skip to content

Conversation

@jeffdgr8
Copy link

@jeffdgr8 jeffdgr8 commented May 26, 2018

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 an NSDictionary iterates over its keys as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant