开发者

How to reconcile android cursor '_id' column with remote server db UIDs?

开发者 https://www.devze.com 2023-03-20 09:49 出处:网络
Can anyone clarify how loading server side data into an android sqlite db via a cursor should work with regards to ids?

Can anyone clarify how loading server side data into an android sqlite db via a cursor should work with regards to ids? Should I have '_id' column in each table and also a column with my server side uids? This seems awkward. I am missing whether I can just insert my own row ids (from a PostgreSql db) into the '_id'开发者_如何学JAVA column and whether there are some implications of this that will make me sorry later?


_id is used only in CursorAdapter to determine which column is id. You can override this behavior in CursorAdapter or add alias in query to id.

0

精彩评论

暂无评论...
验证码 换一张
取 消