Fixed
Status Update
Comments
ga...@google.com <ga...@google.com> #2
i'm afraid this is not that trivial with nullable fields in the database.
right now, Room always finds 1 constructor. For this to work, we'll need to find all constructors, check which fields are null in the cursor and call the right constructor.
otherwise, calling the default one might result in Room passing null values into it when they are non-null.
right now, Room always finds 1 constructor. For this to work, we'll need to find all constructors, check which fields are null in the cursor and call the right constructor.
otherwise, calling the default one might result in Room passing null values into it when they are non-null.
ga...@google.com <ga...@google.com> #4
Ahh, I didn't know room used `@JvmOverloads` constructors. Neat!
sa...@google.com <sa...@google.com> #5
Mentioned in the original issue, but dropping here too.
It seems you can't have nullable val properties. If I have a class with all val properties, it works fine. It complains about multiple constructors, but it doesn't fail at least
It seems you can't have nullable val properties. If I have a class with all val properties, it works fine. It complains about multiple constructors, but it doesn't fail at least
Description
AGP: 8.0.0-alpha10
Using the snippet below:
and running
./gradlew :library:assembleDebug --configuration-cache
fails withAdding to
variant.sources.java
instead ofvariant.sources.resources
fixes the issue.