                     value = NSNull()
                 }
             } else {
-                if let x = obj.valueForKey(each.label){
+                if let x = $0.serialize(obj.valueForKey($0.label)){
                     value = x
                 } else {
                     value = NSNull()

    public func addModel<T: AmigoModel>(obj: T){
        let type = obj.dynamicType.description()
        let model = typeIndex[type]!
        if obj.valueForKey(model.primaryKey.label) == nil{
            insert(obj, model: model)
        } else {
            update(obj, model: model)

        let value = obj.valueForKey(id)!
        var update = model.table.update()
        let sql: String
        let predicate = NSPredicate(format: "\(id) = '\(value)'")
        var params = [AnyObject]()

        for each in model.table.sortedColumns{
