     @NSManaged var activity: String?
     @NSManaged var id: NSNumber? // = -1
     @NSManaged var use: String?
-//    @NSManaged var languages:[String]?
+//    @NSManaged var languages:[String]? // todo - enable by storing first language
     @NSManaged var fundedAmount: NSNumber? // = 0
     @NSManaged var partnerID: NSNumber? // = -1
     

        super.init(entity: entity, insertIntoManagedObjectContext: context)
    }
    
    /*! Init instance with a dictionary of values, and a core data context. */
    init(dictionary: [String: AnyObject], context: NSManagedObjectContext) {
        
        let entity = NSEntityDescription.entityForName("KivaLoan", inManagedObjectContext: context)!
        super.init(entity: entity, insertIntoManagedObjectContext: context)
        
        self.name = dictionary[InitKeys.name] as? String
        self.country = dictionary[InitKeys.country] as? String
        self.geo = dictionary[InitKeys.geo] as? String
        self.town = dictionary[InitKeys.town] as? String
        self.postedDate = dictionary[InitKeys.postedDate] as? String
        self.activity = dictionary[InitKeys.activity] as? String
        self.id = dictionary[InitKeys.id] as? NSNumber
        self.use = dictionary[InitKeys.use] as? String
        self.fundedAmount = dictionary[InitKeys.fundedAmount] as? NSNumber
        self.partnerID = dictionary[InitKeys.partnerID] as? NSNumber
        self.imageID = (dictionary[InitKeys.image])?.objectForKey(InitKeys.imageId) as? NSNumber
        //self.templateID = (dictionary[InitKeys.image])?.objectForKey("template_id") as? NSNumber
        self.imageTemplateID = dictionary[InitKeys.imageTemplateID] as? NSNumber
        self.borrowerCount = dictionary[InitKeys.borrowerCount] as? NSNumber
        self.loanAmount = dictionary[InitKeys.loanAmount] as? NSNumber
        self.status = dictionary[InitKeys.status] as? String
        self.sector = dictionary[InitKeys.sector] as? String
    }
    
//    // designated initializer
//    init() {

    @NSManaged var imageTemplateID: NSNumber? // = -1
    
    @NSManaged var borrowerCount: NSNumber? // = 0
    //todo @NSManaged var lenderCount: NSNumber? // = 0
    @NSManaged var loanAmount: NSNumber? // = 0
    @NSManaged var status: String?
    @NSManaged var sector: String?
