I'm planning on fetching a list from my database, where certain records contain a property that may be set. I want to query and display items which don't have this property
{
books: {
book_3: {
title: "Return of The King"
},
book_2: {
title: "The Two Towers"
},
book_1: {
title: "The Fellowship of the Ring"
read: 1256953732
}
}
}
I've read the first book and I want to display the remaining two books. In Firebase I do:
fbl.child('books').orderByChild('read').equalTo(null).on("value", function(data) {
// handle data
}
And in AngularFire2 I would do something like:
this.af.database.list('books', { query: {
orderByChild: 'read',
equalTo: null
}});
The first way works and I get book_2, book_3, but the AngularFire2 way returns the whole list! Is there a value that can be indicated as a null value? I've tried booleans, empty strings etc. but nothing seems to work.
Perhaps this is a bug.
equalTooption. Ifnullis a sensible value that's useful with the SDK, it should really only be ignoringundefined. I'd raise an issue.