put method
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
Future<Id> put(OBJ object) {
return putAll([object]).then((List<Id> ids) => ids[0]);
}