I have found what seems to be a weird bug in either the Firebase Javascript 
lib or the API itself:

When using a simple ref.limit() query for a simple nested data structure, 
Firebase sometimes returns wrong data under specific conditions. I have set 
up a simple jsfiddle to demonstrate.

How to reproduce:

1. Open the demo at http://jsfiddle.net/yhv5u/9/ in *two* browser tabs to 
establish two connections
(ideally, create your own firebase and replace the URL to avoid any 
problems from other people testing it out)
2. Insert *two* new entries into the data structure
3. *Delete* the last entry
4. *Reload* one of the pages

Query:

ref.limit(10)

Returned data after page reload:

{
   parent: {
     firstChildName: true,
     secondChildName: {firstChildName: true} *<-- weird! also, this was 
deleted*
   }
 }

Expected data:
{
   parent: {
     firstChildName: true
   }
 }

The wrong data is only returned for the exact same query. Changing it, e.g. 
by changing or removing the limit, or looking at Forge shows the correct 
data.

I've also seen this after inserting data without subsequently deleting, but 
cannot reliably reproduce.

I'm grateful for any hints or workarounds.

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/firebug/b0caaaa1-08c9-4ba4-a5d4-fb683de07564%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to