I have in my local database a table called event with the fields:
- id (PK)
- name (text)
- date (time)
- favorite (int, 0 or 1)
The server would give me a list of events, without the favorite field, the favorite field is only local.
I'm using this code to insert events
@Insert(onConflict = OnConflictStrategy.REPLACE)
void insertEvents(List<Event> events);
The thing is that, if an event is already stored in the local database, it will loose the favorite property, and it will always be false after is inserted and replaced.
Is there a way to bulk insert like this, but keep the favorite field?