Android-ORM-benchmark
Android-ORM-benchmark copied to clipboard
Room results are incorrect case of using foreach instead of Room relationships
In Room there are approaches that could be used to define the relations between the entities:
- @Embedded (nested objects)
- @ForeignKey
- @Relation In test should have been using relationship instead of two sequential request and foreach to bind a library to a book. My simple read results with foreach are about 400ms comparing to using @Embedded relationship they are 30ms.