So, we have a contact management system where we store first name, last name and company name. i understand that firebase db cannot do those relational DB style queries using relational operators but is there a creative way to support that search can give results from either if the above 3 attributes.?
As an example:
{
"fName" : "abc",
"lName" : "pqr",
"cName" : "lmn"
},
{
"fName" : "pbc",
"lName" : "aqr",
"cName" : "tmn"
},
{
"fName" : "dbc",
"lName" : "tqr",
"cName" : "amn"
},
The query used currently is:
this.db.list("/users/" + userKey + "/cards",
ref => ref.orderByChild('fName').startAt('a').endAt('a' +"\uf8ff") )
With above query it will only return 1st record. What I need is to return all 3 as all 3 has at least one property beginning with 'a'
I think the other suggested tricks on other posts like creating another attribute combining values from other attributes wont work here. As they do a equalTo search.