-3

I have two different room database.two dao class ..how we can get all data that will combination of both tables using id

philipxy
  • 14,867
  • 6
  • 39
  • 83

1 Answers1

0

It is far simpler to not have multiple databases for related data.

If you have separate Room databases and instances thereof then you would have to mimic the join and have separate queries to extract the separate objects and combine them outside of room.

An option that would allow a join would be to attach one database to the other. However, then the Room database, to which the other is attached, will not be aware of the other database's entities. In short you end up not using Room.

You may wish to a read of the answer here RoomDB - Can you JOIN tables from different databases

MikeT
  • 51,415
  • 16
  • 49
  • 68