What Should You Use with Room?
Given the deprecations, your options with Room now are very straightforward:
- If you want to replace the database contents with new data when there is a conflict, use
- If you want to keep the existing database contents when there is a conflict, but not treat it as an error, use
- If you want to keep the existing database contents when there is a conflict, and you want an exception to be raised so you know about the problem, use
ABORT(or, do nothing, as
ABORTis the default strategy)
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.