I have an object where you can add a list of addresses in the address field, the purpose is to list the objects according to the neighborhoods where the objects reside.
Object:
public class Suspeito implements Serializable {
private String id;
private String foto;
private String nome;
private String apelido;
private String data_nascimento;
private String num_documento;
private String tipo_documento;
private String mae;
private String pai;
private String antecedentes;
private ArrayList<Endereco> endereco;
private String anotacoes;
}
Query:
consulta = firebaseReferencia.child("Suspeitos").child("endereco")
.orderByChild("bairro")
.equalTo(txt_bairro.getText().toString().toUpperCase());
The query is returning null.