Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to suppress the android-room warning: Primary key constraint on id is ignored when being merged into Foo

Tags:

android-room

When using Android android-architecture-component room library, and I set a @Embedded(prefix = "xxx_") to a Class field, got the warning after every build:

enter image description here

How to suppress the warning: Primary key constraint on id is ignored when being merged into Foo

Thanks!

like image 791
drakeet Avatar asked Dec 18 '17 12:12

drakeet


1 Answers

add @SuppressWarnings(RoomWarnings.PRIMARY_KEY_FROM_EMBEDDED_IS_DROPPED) to History class

like image 124
lau yummy Avatar answered Sep 28 '22 23:09

lau yummy