Question

Is it possible to set ID of certain record? I'm importing multi table database into my application database, that is mapped to ActiveAndroid model. I get it over http in json. It would save a lot of work to preserver those server-side ids on records to have same relations id<>id as on the server.

I planned on deserialisating json to objects using gson and then to save them using activeandroid .save()

Or what is the simplest way to accomplish something like that. Get rid of the the json and do some SQL import?

Was it helpful?

Solution

Not possible. Importing data is to be done by calling SQL inserts directly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top