Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(firestore): add JvmField annotation to kotlin POJO snippet #243

Merged
merged 1 commit into from
Oct 22, 2020

Conversation

thatfiredev
Copy link
Member

As mentioned in StackOverflow answers 1 and 2: when using Kotlin's data class in firestore, we need to add the @field:JvmField annotation to boolean fields prefixed with 'is', otherwise the Firebase SDK Snapshot parser always returns the default value.

This PR should add that annotation to our Docs, as suggested in this comment.

@samtstern
Copy link
Contributor

@rosariopfernandes nice catch! That would definitely trip people up.

@samtstern samtstern merged commit 985f723 into firebase:master Oct 22, 2020
@thatfiredev thatfiredev deleted the rpf-kotlin-pojo-booleans branch October 22, 2020 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants