Skip to content
Advertisement

Firebase database Data Retrieve getter error

I was trying to get some data from my Firebase realtime-database as followed generally, but I couldn’t figure out where in the code the problem was.

The code is attached:

JavaScript

I also use getter:

JavaScript

database image here

xml all allmedicine

JavaScript

find_medicine xml

JavaScript

Advertisement

Answer

Change your query to –

JavaScript

And according to firebase doc – The class has an empty constructor, which is required for Firebase’s automatic data mapping.

So change your model as –

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement