Problem with NSDate on queryAttributes result #78

Closed
opened 2025-12-29 15:23:46 +01:00 by adam · 1 comment
Owner

Originally created by @roceller on GitHub (Sep 1, 2016).

Example code:

let localData = CoreStore.queryAttributes( From(ModelUserFollowingXref), Select("ufxUserId", "ufxStatus", "ufxCreated", "ufxUpdated"), Where("ufxUserId == %@", row.1["ufx_user_id"].intValue) && Where("userId == %@", row.1["user_id"].intValue) )

The result dictionary is not quoted and the NSDate field is causing issue when converting to JSON..

[[ufxCreated: 2016-07-20 23:27:59 +0000, ufxUpdated: 2016-07-20 23:28:03 +0000, ufxUserId: 151989, ufxStatus: 0]]

Originally created by @roceller on GitHub (Sep 1, 2016). Example code: `let localData = CoreStore.queryAttributes( From(ModelUserFollowingXref), Select("ufxUserId", "ufxStatus", "ufxCreated", "ufxUpdated"), Where("ufxUserId == %@", row.1["ufx_user_id"].intValue) && Where("userId == %@", row.1["user_id"].intValue) )` The result dictionary is not quoted and the NSDate field is causing issue when converting to JSON.. `[[ufxCreated: 2016-07-20 23:27:59 +0000, ufxUpdated: 2016-07-20 23:28:03 +0000, ufxUserId: 151989, ufxStatus: 0]]`
adam closed this issue 2025-12-29 15:23:46 +01:00
Author
Owner

@roceller commented on GitHub (Sep 1, 2016):

Nevermind... I didn't have to convert to JSON.

@roceller commented on GitHub (Sep 1, 2016): Nevermind... I didn't have to convert to JSON.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#78