AlexDenisov / iActiveRecord

ActiveRecord for iOS without CoreData, only SQLite
http://alexdenisov.github.com/iActiveRecord/
MIT License
354 stars 50 forks source link

fixed NSDate column issue returning only numbers when NSDate instances are expected #65

Closed jklimke closed 10 years ago

jklimke commented 10 years ago

changed toColumnType of the NSDateColumn to return NSDate instances instead of NSNumber values with the time interval

jklimke commented 10 years ago

actually the problem goes a little deeper than i thought. Since dates are stored as a double value, the associated object that is set on fetching from the database is of type NSNumber * . In these cases, the fix works. But, in case you set an NSDate* value for a date yourself, the associated object is of type NSDate and the conversion of the number to a date results in a crash. I will try to fix this

ghost commented 10 years ago

Thanks, waiting for merge! @AlexDenisov

ghost commented 10 years ago

@AlexDenisov will this be merged?