I have a database that looks like this:
and i'm using FirebaseRecyclerAdapter to show all on a screen, and i wanted to make a search by ingredients, so i tried to pass the FirebaseRecyclerAdapter a query, where "recipe" is some recipe(in the db image, it's the 1VS..) and search is some ingredient that i type(for example, Cocoa). but the adapter says i cannot convert "String" to "Recipe" (which is my model that i'm passing to the FirebaseRecycler) because it thinks that i'm trying to just order by ingredients and not the recipes themselves, and idea how i can solve this issue? thanks.
Query searchRecipesQuery = recipeRef.child(recipe).child("ingredients").orderByValue().startAt(search).endAt(search + "\uf8ff");
FirebaseRecyclerOptions<Recipe> options = new FirebaseRecyclerOptions.Builder<Recipe>()
.setQuery(searchRecipesQuery, Recipe.class).build();