What’s New in Room (Android Dev Summit '19)

Room offers type-safe, easy persistence without the boilerplate—but we didn’t stop there! In Room 2.2, we’ve added several highly requested features: better support for relationships, integration with Kotlin Flows, pre-packaged databases, partial entities, schema default values and faster build speed. In this talk, you’ll learn about these features and how using them in your app will enable more advanced functionality and require less code to write and maintain.

Presented by:…


  1. Can user dynamically create and delete tables from a database using Room?

    It seems like it works only with a predefined set of tables hardcoded by developer.

  2. What's the difference between Flow<Dog> and Flow<List<Dog>>? Doesn't Flow<List<Dog>> mean that it's a Flow of lists which seems weird to me because Flow itself can contain multiple dogs? Or has it to do something with Room giving the complete list at once?

  3. Features of Rooms are impressive but this talk had some room for Energy. Though 16 min but felt like its long.

  4. really interesting stuff, i've been using the non stable builds of 2.2.0 and they came just in time for new features needed at work.
    Also, this is a shot in the dark, but:

    i have a "SELECT * from table_a, table_b, table_c…" for 8 different tables. the return type is a class with 8 Embedded classes, each having an embedded room entity and a 1:M Relation to a list of Entity.
    this return item is always null, except when all 8 tables are populated, in which case it returns the item with the subitems with the sublists.
    i have been working on a patchy workaround in the meantime, but i'm really curious as to why this behaviour is happening. is the query somehow worded wrong? is this beyond the capability of room, somehow, and i should query each of the 8 embedded classes individually and then create the return type myself?
    also, on that note, what would be the best approach to merge 8 livedatas into a new one, using a mediatorlivedata, and avoiding unnecessary data emission callbacks? thank you all!

Leave a Reply

Your email address will not be published. Required fields are marked *