Fixed
Status Update
Comments
de...@gmail.com <de...@gmail.com> #2
yb...@google.com <yb...@google.com> #3
> We accept pull requests! :)
Is there a public repo somewhere? I don't see any obvious repo for it inhttps://android.googlesource.com , and it doesn't seem to be inside https://android.googlesource.com/platform/frameworks/support .
Room supports final fields (yay!), which probably will suffice for many people with respect to this feature request.
Is there a public repo somewhere? I don't see any obvious repo for it in
Room supports final fields (yay!), which probably will suffice for many people with respect to this feature request.
ji...@gmail.com <ji...@gmail.com> #4
Room supports immutability (it can use arg constructors) but does not directly support AutoValue. It is in the schedule but not high priority :/. Idk much about its internals at this stage so I'm not sure how we would implement it but should be totally doable.
Sorry we don't have the source release yet :/.
Sorry we don't have the source release yet :/.
ra...@gmail.com <ra...@gmail.com> #5
"It is in the schedule but not high priority" -- completely understandable.
"Sorry we don't have the source release yet :/." -- ah, OK, I thought perhaps with the pull request comment, that meant that there was a repo somewhere that I had overlooked.
Thanks!
"Sorry we don't have the source release yet :/." -- ah, OK, I thought perhaps with the pull request comment, that meant that there was a repo somewhere that I had overlooked.
Thanks!
ra...@gmail.com <ra...@gmail.com> #6
Add autovalue support also means you can easily achieve parcelable by https://github.com/rharter/auto-value-parcel . Please consider support this.
la...@x2mobile.net <la...@x2mobile.net> #7
AutoValue is really a handy way to ensure data integrity.
je...@gmail.com <je...@gmail.com> #8
Please add AutoValue support. AutoValue is a Google library with really good benefits such as toString() , hashCode() , AutoValue.Builder , checks at creation time if @NonNull values are null, etc.
fr...@gmail.com <fr...@gmail.com> #9
FWIW, issue 64206877 is not publicly accessible.
sh...@gmail.com <sh...@gmail.com> #10
@Yigit: That appears to be a private ticket. Any way we can have access to keep up with it?
do...@gmail.com <do...@gmail.com> #11
Have any updates?
wh...@gmail.com <wh...@gmail.com> #12
news?
ej...@gmail.com <ej...@gmail.com> #13
Is there any update? This is huge for app that absolutely enforces immutable entities.
vs...@gmail.com <vs...@gmail.com> #14
SqlDelight has out of the box support for AutoValue. Use it with SqlBrite and you've got *pretty good* parity with Room. With the lack of movement on this ticket, I'd suggest at least taking a look at those if AutoValue is important to you.
lo...@gmail.com <lo...@gmail.com> #15
Support on olways
56...@gmail.com <56...@gmail.com> #16
Sorry this used to be higher priority but other features got in the way (and to be honest, androidX migration took a lot more time than we thought).
I want to make 1 thing clear though, Room does support immutable entities. One of the reasons why this ticket lost some priority is that it is specific to AutoValue, not immutability. If you are using Kotlin, data classes give you the same power and Room supports them properly. (hence, there is an easy way to achieve immutability w/ Room).
The issue in this one is that we don't have out of the box support to discover AutoValue builders.
We still plan to do this, sorry that it is taking longer than we initially communicated.
I want to make 1 thing clear though, Room does support immutable entities. One of the reasons why this ticket lost some priority is that it is specific to AutoValue, not immutability. If you are using Kotlin, data classes give you the same power and Room supports them properly. (hence, there is an easy way to achieve immutability w/ Room).
The issue in this one is that we don't have out of the box support to discover AutoValue builders.
We still plan to do this, sorry that it is taking longer than we initially communicated.
ju...@gmail.com <ju...@gmail.com> #17
I'd like to piggy back onto this issue, because I've fun into a similar problem with immutability that does NOT involve autovalue. What I have found is either a bug or a missing feature, depending on your perspective.
Let's say I have a Kotlin data class with only `val` properties. I want to serialize this into my Room database, but I want to decorate it with a few other values, for example a timestamp so I know when it was last updated, and a userId because my database supports multiple users. Oh look! There's an annotation `@Embedded` that seems to do just want I want. I can create a new class specific to Room persistence, add the few new properties I want, and then "embed" the original object, and damn that was easy.
Oh no. Now my project won't compile. It seems that embedded objects must have public getters -- all my `val`s must now be `var`s. D:
Sigh. I guess I'll just write a new class that has _all_ the properties of the original, plus a few more, and write an extension function to transform from one to the other. Really glad Room saved me all that Sqlite boilerplate, so I now have time for Room-specific boilerplate ;-)
Let's say I have a Kotlin data class with only `val` properties. I want to serialize this into my Room database, but I want to decorate it with a few other values, for example a timestamp so I know when it was last updated, and a userId because my database supports multiple users. Oh look! There's an annotation `@Embedded` that seems to do just want I want. I can create a new class specific to Room persistence, add the few new properties I want, and then "embed" the original object, and damn that was easy.
Oh no. Now my project won't compile. It seems that embedded objects must have public getters -- all my `val`s must now be `var`s. D:
Sigh. I guess I'll just write a new class that has _all_ the properties of the original, plus a few more, and write an extension function to transform from one to the other. Really glad Room saved me all that Sqlite boilerplate, so I now have time for Room-specific boilerplate ;-)
fo...@gmail.com <fo...@gmail.com> #18
*public setters, not public getters
sh...@gmail.com <sh...@gmail.com> #19
#17 seems like a bug, we are supposed to handle Embedded fields in constructor parameters.
Can you file a bug with a sample project ?
We do have a test for having embedded as a constructor parameter, so maybe something else is wrong.
from one of our tests:
@Entity(tableName = "fc")
static class FullConstructor {
@PrimaryKey
public final int a;
public final int b;
@Embedded
public final MyEmbedded embedded;
FullConstructor(int a, int b, MyEmbedded embedded) {
this.a = a;
this.b = b;
this.embedded = embedded;
}
}
Can you file a bug with a sample project ?
We do have a test for having embedded as a constructor parameter, so maybe something else is wrong.
from one of our tests:
@Entity(tableName = "fc")
static class FullConstructor {
@PrimaryKey
public final int a;
public final int b;
@Embedded
public final MyEmbedded embedded;
FullConstructor(int a, int b, MyEmbedded embedded) {
this.a = a;
this.b = b;
this.embedded = embedded;
}
}
yb...@google.com <yb...@google.com> #20
Sure, I'd be happy to put up a sample project. I'll try to pull something together later today or maybe tomorrow.
bo...@li.ru <bo...@li.ru> #21
Well, I tried. Either I did something wrong the first time, or... I did something wrong the first time :shrug-emoji: Tried reproducing in a sample project, couldn't. Mystified, I tried again in my much more complex work project -- couldn't. So, I guess that's a good thing!
ai...@gmail.com <ai...@gmail.com> #22
if added this feature will be good!
ap...@google.com <ap...@google.com> #23
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 8c2d348127161daaf624f77d80cb662e65e3af2a
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Fri Jul 13 15:18:42 2018
Add support for using AutoValue classes as Pojos and Entities.
Support using AutoValue generated classes as Pojos by processing the
AutoValue_* generated class that contains fields and getter
implementations.
To support the AutoValue api @PrimaryKey and @ColumnInfo have been
opened up to target methods. However, since we only want to allow their
usage in methods to support AutoValue a new processing step was added
that throws an error if it finds a method not implement by AutoValue
with any of these two annotations.
Note that Embedded and Relations are not yet supported.
Bug: 62408420
Test: ./gradlew :room:room-compiler:test \
:room:integration-tests:testapp:cC \
:room:integration-tests:autovaluetestapp:cC
Change-Id: I782d6ec074776f7af7cae977848443f3311b1d87
M app-toolkit/settings.gradle
M buildSrc/src/main/kotlin/androidx/build/dependencies/Dependencies.kt
M room/common/src/main/java/androidx/room/ColumnInfo.java
M room/common/src/main/java/androidx/room/PrimaryKey.java
M room/compiler/build.gradle
M room/compiler/src/main/kotlin/androidx/room/RoomProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/checker/AutoValueTargetChecker.kt
M room/compiler/src/main/kotlin/androidx/room/ext/element_ext.kt
M room/compiler/src/main/kotlin/androidx/room/processor/EntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegate.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Constructor.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Warning.kt
M room/compiler/src/main/kotlin/androidx/room/writer/FieldReadWriteWriter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/EntityProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegateTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/checker/AutoValueTargetCheckerTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/test_util.kt
A room/integration-tests/autovaluetestapp/.gitignore
A room/integration-tests/autovaluetestapp/build.gradle
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/TestDatabase.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/ParcelableEntityDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PersonDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PetDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/ParcelableEntityDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PersonDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PetDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/TestDatabaseTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/EmbeddedAutoValue.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/ParcelableEntity.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Person.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Pet.java
A room/integration-tests/autovaluetestapp/src/main/AndroidManifest.xml
M settings.gradle
https://android-review.googlesource.com/720548
https://goto.google.com/android-sha1/8c2d348127161daaf624f77d80cb662e65e3af2a
Branch: androidx-master-dev
commit 8c2d348127161daaf624f77d80cb662e65e3af2a
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Fri Jul 13 15:18:42 2018
Add support for using AutoValue classes as Pojos and Entities.
Support using AutoValue generated classes as Pojos by processing the
AutoValue_* generated class that contains fields and getter
implementations.
To support the AutoValue api @PrimaryKey and @ColumnInfo have been
opened up to target methods. However, since we only want to allow their
usage in methods to support AutoValue a new processing step was added
that throws an error if it finds a method not implement by AutoValue
with any of these two annotations.
Note that Embedded and Relations are not yet supported.
Bug: 62408420
Test: ./gradlew :room:room-compiler:test \
:room:integration-tests:testapp:cC \
:room:integration-tests:autovaluetestapp:cC
Change-Id: I782d6ec074776f7af7cae977848443f3311b1d87
M app-toolkit/settings.gradle
M buildSrc/src/main/kotlin/androidx/build/dependencies/Dependencies.kt
M room/common/src/main/java/androidx/room/ColumnInfo.java
M room/common/src/main/java/androidx/room/PrimaryKey.java
M room/compiler/build.gradle
M room/compiler/src/main/kotlin/androidx/room/RoomProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/checker/AutoValueTargetChecker.kt
M room/compiler/src/main/kotlin/androidx/room/ext/element_ext.kt
M room/compiler/src/main/kotlin/androidx/room/processor/EntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegate.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Constructor.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Warning.kt
M room/compiler/src/main/kotlin/androidx/room/writer/FieldReadWriteWriter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/EntityProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegateTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/checker/AutoValueTargetCheckerTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/test_util.kt
A room/integration-tests/autovaluetestapp/.gitignore
A room/integration-tests/autovaluetestapp/build.gradle
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/TestDatabase.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/ParcelableEntityDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PersonDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PetDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/ParcelableEntityDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PersonDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PetDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/TestDatabaseTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/EmbeddedAutoValue.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/ParcelableEntity.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Person.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Pet.java
A room/integration-tests/autovaluetestapp/src/main/AndroidManifest.xml
M settings.gradle
ap...@google.com <ap...@google.com> #24
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 038e674add5afddbb34371b9c1fda6885efbd7be
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Fri Jul 13 15:18:42 2018
Add support for using AutoValue classes as Pojos and Entities.
Support using AutoValue generated classes as Pojos by processing the
AutoValue_* generated class that contains fields and getter
implementations.
To support the AutoValue api @PrimaryKey and @ColumnInfo have been
opened up to target methods. However, since we only want to allow their
usage in methods to support AutoValue a new processing step was added
that throws an error if it finds a method not implement by AutoValue
with any of these two annotations.
Note that Embedded and Relations are not yet supported.
Bug: 62408420
Test: ./gradlew :room:room-compiler:test \
:room:integration-tests:testapp:cC \
:room:integration-tests:autovaluetestapp:cC
Change-Id: Idce0b5934e0aa864117fc95e7d19a7edc2c94f9f
M app-toolkit/settings.gradle
M buildSrc/src/main/kotlin/androidx/build/dependencies/Dependencies.kt
M room/common/src/main/java/androidx/room/ColumnInfo.java
M room/common/src/main/java/androidx/room/PrimaryKey.java
M room/compiler/build.gradle
M room/compiler/src/main/kotlin/androidx/room/RoomProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/checker/AutoValueTargetChecker.kt
M room/compiler/src/main/kotlin/androidx/room/ext/element_ext.kt
M room/compiler/src/main/kotlin/androidx/room/processor/EntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegate.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Constructor.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Warning.kt
M room/compiler/src/main/kotlin/androidx/room/writer/FieldReadWriteWriter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/EntityProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegateTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/checker/AutoValueTargetCheckerTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/test_util.kt
A room/integration-tests/autovaluetestapp/.gitignore
A room/integration-tests/autovaluetestapp/build.gradle
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/TestDatabase.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/ParcelableEntityDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PersonDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PetDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/ParcelableEntityDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PersonDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PetDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/TestDatabaseTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/EmbeddedAutoValue.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/ParcelableEntity.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Person.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Pet.java
A room/integration-tests/autovaluetestapp/src/main/AndroidManifest.xml
M settings.gradle
https://android-review.googlesource.com/720788
https://goto.google.com/android-sha1/038e674add5afddbb34371b9c1fda6885efbd7be
Branch: androidx-master-dev
commit 038e674add5afddbb34371b9c1fda6885efbd7be
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Fri Jul 13 15:18:42 2018
Add support for using AutoValue classes as Pojos and Entities.
Support using AutoValue generated classes as Pojos by processing the
AutoValue_* generated class that contains fields and getter
implementations.
To support the AutoValue api @PrimaryKey and @ColumnInfo have been
opened up to target methods. However, since we only want to allow their
usage in methods to support AutoValue a new processing step was added
that throws an error if it finds a method not implement by AutoValue
with any of these two annotations.
Note that Embedded and Relations are not yet supported.
Bug: 62408420
Test: ./gradlew :room:room-compiler:test \
:room:integration-tests:testapp:cC \
:room:integration-tests:autovaluetestapp:cC
Change-Id: Idce0b5934e0aa864117fc95e7d19a7edc2c94f9f
M app-toolkit/settings.gradle
M buildSrc/src/main/kotlin/androidx/build/dependencies/Dependencies.kt
M room/common/src/main/java/androidx/room/ColumnInfo.java
M room/common/src/main/java/androidx/room/PrimaryKey.java
M room/compiler/build.gradle
M room/compiler/src/main/kotlin/androidx/room/RoomProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/checker/AutoValueTargetChecker.kt
M room/compiler/src/main/kotlin/androidx/room/ext/element_ext.kt
M room/compiler/src/main/kotlin/androidx/room/processor/EntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegate.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Constructor.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Warning.kt
M room/compiler/src/main/kotlin/androidx/room/writer/FieldReadWriteWriter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/EntityProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegateTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/checker/AutoValueTargetCheckerTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/test_util.kt
A room/integration-tests/autovaluetestapp/.gitignore
A room/integration-tests/autovaluetestapp/build.gradle
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/TestDatabase.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/ParcelableEntityDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PersonDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PetDao.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/ParcelableEntityDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PersonDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PetDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/TestDatabaseTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/EmbeddedAutoValue.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/ParcelableEntity.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Person.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Pet.java
A room/integration-tests/autovaluetestapp/src/main/AndroidManifest.xml
M settings.gradle
ap...@google.com <ap...@google.com> #25
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b4e0fe5d54a89ce8ce9a852774892c498edd4508
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jul 23 19:51:46 2018
Add support for @Embedded in AutoValue Pojos.
Bug: 62408420
Test: ./gradlew :room:integration-tests:autovaluetestapp:cC
Change-Id: I4aa02aae022e4971a8708c4aba4cf9f3e90f65a5
M room/common/src/main/java/androidx/room/Embedded.java
M room/compiler/src/main/kotlin/androidx/room/checker/AutoValueTargetChecker.kt
M room/compiler/src/test/kotlin/androidx/room/processor/checker/AutoValueTargetCheckerTest.kt
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PersonDao.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PetDao.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PersonDaoTest.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PetDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/PersonAndCat.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Pet.java
https://android-review.googlesource.com/720896
https://goto.google.com/android-sha1/b4e0fe5d54a89ce8ce9a852774892c498edd4508
Branch: androidx-master-dev
commit b4e0fe5d54a89ce8ce9a852774892c498edd4508
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jul 23 19:51:46 2018
Add support for @Embedded in AutoValue Pojos.
Bug: 62408420
Test: ./gradlew :room:integration-tests:autovaluetestapp:cC
Change-Id: I4aa02aae022e4971a8708c4aba4cf9f3e90f65a5
M room/common/src/main/java/androidx/room/Embedded.java
M room/compiler/src/main/kotlin/androidx/room/checker/AutoValueTargetChecker.kt
M room/compiler/src/test/kotlin/androidx/room/processor/checker/AutoValueTargetCheckerTest.kt
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PersonDao.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PetDao.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PersonDaoTest.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PetDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/PersonAndCat.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Pet.java
fl...@google.com <fl...@google.com> #26
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 0f55cbbe13e26294af67aca6bce0e13a960ae752
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jul 30 17:06:22 2018
Add support for @Relation in AutoValue Pojos.
Bug: 62408420
Test: ./gradlew :room:integration-tests:autovaluetestapp:cC
Change-Id: I7634ac388e328dca9c33f7ac422080b42b362ee0
M room/common/src/main/java/androidx/room/Relation.java
M room/compiler/src/main/kotlin/androidx/room/checker/AutoValueTargetChecker.kt
M room/compiler/src/test/kotlin/androidx/room/processor/checker/AutoValueTargetCheckerTest.kt
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PersonDao.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PetDao.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PersonDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/PersonWithCats.java
https://android-review.googlesource.com/723664
https://goto.google.com/android-sha1/0f55cbbe13e26294af67aca6bce0e13a960ae752
Branch: androidx-master-dev
commit 0f55cbbe13e26294af67aca6bce0e13a960ae752
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jul 30 17:06:22 2018
Add support for @Relation in AutoValue Pojos.
Bug: 62408420
Test: ./gradlew :room:integration-tests:autovaluetestapp:cC
Change-Id: I7634ac388e328dca9c33f7ac422080b42b362ee0
M room/common/src/main/java/androidx/room/Relation.java
M room/compiler/src/main/kotlin/androidx/room/checker/AutoValueTargetChecker.kt
M room/compiler/src/test/kotlin/androidx/room/processor/checker/AutoValueTargetCheckerTest.kt
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PersonDao.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/dao/PetDao.java
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/test/PersonDaoTest.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/PersonWithCats.java
vf...@thoughtworks.com <vf...@thoughtworks.com> #27
This feature will be available in Room 2.1.0
sl...@gmail.com <sl...@gmail.com> #28
Does this means it could be used only with AutoValue, and not with other code generators like Immutables https://immutables.github.io/ ?
In that case it's really limited.
Can you provide way to have static factory methods instead of constructors? Then we can use whatever code generator.
Like:
@RoomFactoryMethod
public static MyEntity create(int id, String name) {
return ImmutableMyEntity.of(id, name);
}
In that case it's really limited.
Can you provide way to have static factory methods instead of constructors? Then we can use whatever code generator.
Like:
@RoomFactoryMethod
public static MyEntity create(int id, String name) {
return ImmutableMyEntity.of(id, name);
}
Description
Version used: 1.0.0alpha3
Devices/Android versions reproduced on: all
After using Room and RxRoom I was lacking of some functionalities like the ability to return an Single/Completable from insert queries.
For example something like this would be super helpful :
@Insert(onConflict = OnConflictStrategy.REPLACE)
Completable insertAll(CatalogEntry... entries);
@Insert(onConflict = OnConflictStrategy.REPLACE)
Single<Long> insertAll(CatalogEntry... entries);
@Insert(onConflict = OnConflictStrategy.REPLACE)
Single<List<Long>> insertAll(CatalogEntry... entries);
Also when doing a query for retrieving a list, why should I use Flowable, if I just want to get a list my query should be like:
@Query("SELECT * FROM catalog_entries")
Single<List<CatalogEntry>> getAll();
Thanks for your work ! I love it already :)