Fixed
Status Update
Comments
yb...@google.com <yb...@google.com>
tj...@gmail.com <tj...@gmail.com> #3
i'm still skeptical about changing the default to crash because I'm worried that some apps won't handle migrating from older versions properly.
But creating a builder option totally makes sense so that more avare developers can turn it on.
Btw, another nice thing about drop by default is the development time. during development, you can easily increment it and pass the check and then just provide the migration from latest release to current release when shipping the app.
But creating a builder option totally makes sense so that more avare developers can turn it on.
Btw, another nice thing about drop by default is the development time. during development, you can easily increment it and pass the check and then just provide the migration from latest release to current release when shipping the app.
Description
Version used: 1.0 Alpha 4
Devices/Android versions reproduced on: Android Emulator API 25
I have an EventEntity class and a TeamEntity class, both of which sport the @Entity annotation.
I have two POJOs; Entity and Team which extend the above classes respectively.
Team is nested under the Event POJO with the @Embedded annotation.
Team also has a @Relation annotation to another @Entity; Role.
The issues arise in the TeamDao_impl and EventDao_impl.
When the Team has a relation, even if the relation field is passed in the constructor, room ignores it and prefers to set the field via a setter method. This is a minor bug. The real issue arises when Trying to construct the Event.
Room constructs the Team first, does not set the Roles on the Team, then constructs the Event passing the Team in the constructor, then attempts to call the setRoles method on the Event, and not the Team.
I've attached skeletons of the affected classes and generated DAO code.