Fixed
Status Update
Comments
ya...@google.com <ya...@google.com>
da...@google.com <da...@google.com> #2
I think it is because we've deprecated the accidently public mDatabase. Should be fine.
Can you share the full warning so we can verify?
Can you share the full warning so we can verify?
ap...@google.com <ap...@google.com> #3
That's the entire message:
...app\build\generated\source\kapt\remoteDevDebug\za\co\ruggedmobile\petermeter\data\PeterMeterDb_Impl.java:
uses or overrides a deprecated API.
Recompile with -Xlint:deprecation for details.
...app\build\generated\source\kapt\remoteDevDebug\za\co\ruggedmobile\petermeter\data\PeterMeterDb_Impl.java:
uses or overrides a deprecated API.
Recompile with -Xlint:deprecation for details.
da...@google.com <da...@google.com>
ys...@gmail.com <ys...@gmail.com> #4
I see it is a "Note" not a warning.
nn...@gmail.com <nn...@gmail.com> #5
Here are the warnings I'm getting with -Xlint:deprecation:
AppDatabase_Impl.java:154: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
if (mCallbacks != null) {
^
AppDatabase_Impl.java:155: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
for (int _i = 0, _size = mCallbacks.size(); _i < _size; _i++) {
^
AppDatabase_Impl.java:156: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
mCallbacks.get(_i).onCreate(_db);
^
AppDatabase_Impl.java:163: warning: [deprecation] mDatabase in RoomDatabase has been deprecated
mDatabase = _db;
^
AppDatabase_Impl.java:166: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
if (mCallbacks != null) {
^
AppDatabase_Impl.java:167: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
for (int _i = 0, _size = mCallbacks.size(); _i < _size; _i++) {
^
AppDatabase_Impl.java:168: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
mCallbacks.get(_i).onOpen(_db);
^
AppDatabase_Impl.java:154: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
if (mCallbacks != null) {
^
AppDatabase_Impl.java:155: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
for (int _i = 0, _size = mCallbacks.size(); _i < _size; _i++) {
^
AppDatabase_Impl.java:156: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
mCallbacks.get(_i).onCreate(_db);
^
AppDatabase_Impl.java:163: warning: [deprecation] mDatabase in RoomDatabase has been deprecated
mDatabase = _db;
^
AppDatabase_Impl.java:166: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
if (mCallbacks != null) {
^
AppDatabase_Impl.java:167: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
for (int _i = 0, _size = mCallbacks.size(); _i < _size; _i++) {
^
AppDatabase_Impl.java:168: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
mCallbacks.get(_i).onOpen(_db);
^
Description
@Entity
data class User(
@PrimaryKey id: Long,
name: String,
email: String?
)
data class UserName(id: Long, name: String)
data class UserEmail(id: Long, email: String)
@Dao
interface UserDao {
@Insert(entity = User::class)
insertWithoutEmail(userName: UserName)
@Update(entities = User::class)
updateEmail(userEmail: UserEmail)
}
- The @Insert example above is a bit silly, but it makes sense when you want to leave out columns with default values (
- We probably need a better API to support insertion/update of multiple entities/pojos.