Fixed
Status Update
Comments
jb...@google.com <jb...@google.com>
cl...@google.com <cl...@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.
jb...@google.com <jb...@google.com> #4
Ahh, I didn't know room used `@JvmOverloads` constructors. Neat!
pr...@google.com <pr...@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
Component used: Navigation Version used: 2.7.6 Devices/Android versions reproduced on: any devices
When using
saveState
andrestoreState
in Nested Navigation, the ViewModel whose parent BackStackEntry is Owner is not restored.I have attached the project to reproduce, so please check it.