putSync method

Id putSync(
  1. OBJ object, {
  2. bool saveLinks = true,
})

Insert or update an object. Returns the id of the new or updated object.

If the object has an non-final id property, it will be set to the assigned id. Otherwise you should use the returned id to update the object.

Implementation

Id putSync(OBJ object, {bool saveLinks = true}) {
  return putAllSync([object], saveLinks: saveLinks)[0];
}