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
Post a Comment