Issue Type: Bug Bug
Affects Versions: 1.3.0
Assignee: Unassigned
Created: 06/Dec/13 11:46 AM
Description:

The following test is failing, saving the object twice because after the first insert the id is not part of serialized value.

it(@"should retrieve only one element when we save an object without id, read all and update it", ^{
            NSMutableDictionary* user1 = [NSMutableDictionary
                                          dictionaryWithObjectsAndKeys:@"Christos", @"name", nil];

            BOOL success;

            success = [sqliteStorage save:user1 error:nil];
            [[theValue(success) should] equal:theValue(YES)];
            

            // reload store
            //sqliteStorage = [AGSQLiteStorage storeWithConfig:config];

            // read all
            NSArray *object = [sqliteStorage readAll];
            [[[object[0] objectForKey:@"name"] should] equal:@"Christos"];

            success = [sqliteStorage save:object[0] error:nil];

            // read all the store and count
            NSArray* objects = [sqliteStorage readAll];
            [[objects should] haveCountOf:(NSUInteger)1];
        });
Fix Versions: 1.4.0
Project: AeroGear iOS
Priority: Major Major
Reporter: Corinne Krych
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira