angular - Firebase query on multiple child -
right i'm trying write query... i'm stucked little bit.
scheme:
news -news1 -timestamp -labels -soccer: true -sport: true -news2 ... so problem is: have last x (e.g.:10) news based on it's timestamp, done simple query(using angularfire2)
this.topnews = this.af.database.list('news',{ query: { orderbychild: 'timestamp', limittofirst: 10 } }); the problem is, have them it's label, , news can have multiple labels (which implies can't put every news inside 1 label.. hierarchic label structure isn't option)
i know there no option query multiple childs, in case there no proper solution ever client side logic implementation: if first 10 it's timestamp, , client filter on e.g.: soccer, if there no soccer news in between first 10 news?!
so real question experienced firebase query masters and/or angular2 geniuses and/or nosql scheme masters: how should solve problem?
Comments
Post a Comment