Closed praneetloke closed 10 years ago
will look into it!
Thanks, dude!
I can't replicate this bug. And after looking through the code a couple of times i cannot understand why this is happening. So some questions.
Android version is 4.2.2. I am using the support library (and, ABS as well) loaders. I am passing in the loader manager instance from getSupportLoaderManager().
Query.one(Example.class, "select * from Example where something=?", something).getAsync(getSupportLoaderManager(), onExampleLoaded);
I managed to replicate and fix a similar issue using the support loaders. Please comment here if your issue is still present after testing the new version (should be hitting maven central within the next couple hours)
wow!Thanks, man! I'll check it out and get back to you.
OK. I'll try my best to describe this correctly. Right now, I am not sure if I am doing something wrong or if there is a bug in the async callback.
I have a scenario where I check for the existence of a certain item in the DB before I save it and hence I have a Query.One().getAsync() call. The callback given to the getAsync() part is returning false and yet it gets called again when I actually do save the item if it doesn't exist in the database. Moreover, since I save to the DB using saveAsync(), Sprinkles seems to call the callback anyway even when the record has not yet been saved and, thereby resulting in two records in the DB for a single save.
I guess a simple code sample to illustrate would be clearer: