core data - Swift Fetch Request Returning Empty Item In Results -
i have project need fetch request gets recent 'updated' date of core data entity. when examine results returned query seeing rather strange behaviour. in addition 'correct' result containing date results include empty dictionary item. happens every time, regardless of underlying data looks like. stranger, if turn on sql logging in xcode , execute logged query against sqllite db produces correct result no entries. i'm not quite sure i'm doing wrong here, appreciated. the function builds , executes query: func queryforcontactdate(context:nsmanagedobjectcontext) -> anyobject? { var expressiondescriptions = [anyobject](); let expressiondescription = nsexpressiondescription() // name column expressiondescription.name = "maxupdated" // use expression specify aggregate action want take , // on column. in case max on update_at column expressiondescription.expression = nsexpression(format: "@max.updated_at") ...