DocumentSnapshot.toObject returns POJO with null fields

207 views
Skip to first unread message

Arupjyoti C

unread,
Dec 13, 2021, 10:56:53 AM12/13/21
to Firebase Google Group
Hi Group,

The POJO ball has null fields.

                 void bind(final DocumentSnapshot mSnap) {

                         Ball ball = mSnap.toObject(ball.class);

Could you please give me a checklist on how to go about solving this?

I just have four fields in the firestore document and I am getting those in the POJO.
I have run the debugger in android studio and I can see the snapshot getting fetched fine.
Only the POJO is having null fields after deserialization( the POJO itself is not null).

Please let me know if you require any other info from my side to make it more clearer.

Looking forward to your help.

Thanks
Arupjyoti

Arupjyoti C

unread,
Dec 13, 2021, 12:22:51 PM12/13/21
to fireba...@googlegroups.com
Hi Team, 

This is resolved. Had to make all the fields lowercase in the firestore database.

Thanks
Arupjyoti

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/273c20c8-957f-49b8-867e-4c8a02fa8b4an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages