Skip to content
This repository has been archived by the owner on Nov 25, 2019. It is now read-only.

NSDate column values are returned as _NSCFNumber* objects #64

Open
jklimke opened this issue Dec 10, 2013 · 0 comments
Open

NSDate column values are returned as _NSCFNumber* objects #64

jklimke opened this issue Dec 10, 2013 · 0 comments

Comments

@jklimke
Copy link

jklimke commented Dec 10, 2013

Hi,

i noticed when i tried to work with the updatedAt and other date fields, that the values returned from NSDate* getters are in fact of type NSCFNumber*

here is an excerpt of a xcode debugger session. the field lastUpdate is a NSDate* property.

self PNOfferUpdater * 0xc080480 0x0c080480
NSObject NSObject
_delegate PNOfferListViewController * 0xc07e580 0x0c07e580
_groups NSArray * nil 0x00000000
_groupOffers __NSDictionaryM * 0 key/value pairs 0x0c085220
_updateInterval NSTimeInterval 0 0
lastUpdate __NSCFNumber * (double)1.38669e+09 0x0c0815b0
updateRun PNOfferUpdate * 0xc07f160 0x0c07f160
ActiveRecord ActiveRecord

After a little more debugging i found out that the toColumnType method of the NSDateColumn directly returns the value that was passed to the method. I think it should return an NSDate object made out of the nsnumber-object passed.

jklimke added a commit to jklimke/iActiveRecord that referenced this issue Dec 10, 2013
changed toColumnType of the NSDateColumn to return NSDate instances instead of NSNumber values with the time interval
jklimke added a commit to jklimke/iActiveRecord that referenced this issue Feb 10, 2014
* master:
  Update .travis.yml
  Update README.md
  Update .travis.yml
  AlexDenisov#64 changed toColumnType of the NSDateColumn to return NSDate instances instead of NSNumber values with the time interval
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant