android - InsertOrReplace entity without overriding specified parameter -
i'm having following issue greendao , don't know how solve it. have entity - lets user, has 4 potentials param:first_name,last_name,age,local_val , when i'm getting user server has 3 params: first_name,last_name,age. now, i'm guessing when i'm getting user server , using insertorreplace user(with same id) overrides , value in local_val sets 0 because server doesn't return it.
a naive solution user entity database id , check value of local_val, if it's not equals 0 save again in new user server. solution isn't because contains many database access.
is possible not override entities values?
( in scenario val contains id of different entity 1-n relation)
Comments
Post a Comment