When my game starts up, it checks for existing inventory.
If no inventory is found it adds two objects to the inventory
When the first object is added, a save is called, and since the databaseObject key is 0, create is called.
So now the app is continuing, and will handle a response from the database when it arrives.
Before the create responds, another object is added to the inventory, and a save is called on it.
The second save also sees a 0 database key, so it tries to create the object again.
Of course that results in a createFailure condition.
I see the the database object has a private member, isSaving, but I can't access it (and it does not seem to change after the create call is made).
I can imagine some ways around this, but none are pretty.
Suggestions?