Status Update
Comments
yb...@google.com <yb...@google.com> #2
unfortunately, javac does not give us the actual method parameter names when it is already compiled, even though the information is technically available.
We could try to grab them via reflection but we try not to do that kind of stuff as those hacks eventually explode in the most inconvenient time.
Seems like the only reasonable fix here is to provide an annotation to be able to preserve those names which is not pretty but could provide a proper solution that wont break.
We could try to grab them via reflection but we try not to do that kind of stuff as those hacks eventually explode in the most inconvenient time.
Seems like the only reasonable fix here is to provide an annotation to be able to preserve those names which is not pretty but could provide a proper solution that wont break.
yb...@google.com <yb...@google.com> #3
for 1.1., we are planning to fix this for kotlin since parameter names are part of the kotlin class API.
For java, we will need to come up w/ some annotation :/.
For java, we will need to come up w/ some annotation :/.
Description
Version used: 1.0.0-rc1
Devices/Android versions reproduced on: Any phone/Any version
If we create the room immutable entity and room database in same module, annotation processor would generate right code. Dao will use constructor with parameters, and it's OK.
When we separate the room immutable entity and room database (for example entity is located in library module and database in app module), annotation processor would generate code not correct. Dao will use default constructor (default construtor use @Ignore annotation) and try to set value with setters, but the entity doesn't have them.