Sugar ORM in Android: update a saved object in SQLite -



Sugar ORM in Android: update a saved object in SQLite -

i'm new app development using sqlite , sugar orm on android, , have tried read through sugar orm documentation, didn't find how update saved object in sqlite. can still save object after changing properties? like:

customer mycustomer = (customer.find(customer.class, "id = ?", id)).get(0); mycustomer.setname("new name"); mycustomer.setaddress("new address"); mycustomer.save(); // okay updating object?

the save() method won't create new object while leaving old entry untouched, right?

it update entity. sugar orm overwriting existing e.g name , updated "new name" after save() method call.

android sqlite orm crud

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -