tciuro / NanoStore

NanoStore is an open source, lightweight schema-less local key-value document store written in Objective-C for Mac OS X and iOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in - (NSFNanoDatatype)NSFP_datatypeForTable:(NSString *)table column:(NSString *)column

tciuro opened this issue · comments

The test that allocates a new dictionary when we cache the data types is wrong:

    NSMutableDictionary *tempSchema = [_schema objectForKey:table];
    if (nil != tempSchema) {
        tempSchema = [[NSMutableDictionary alloc]init];
    } else
            ;

It should be changed to this instead:

    NSMutableDictionary *tempSchema = [_schema objectForKey:table];
    if (nil == tempSchema) {
        tempSchema = [[NSMutableDictionary alloc]init];
    }