Version: datastore-0.5.0
Edits
#
Saving DataThe DataStore Models provides two methods to save data;
save()
- saveOrUpdate()
save()
generates a primary key (in this case, an id
), if one is not provided.
#
Updating Data#
Save Or UpdateThe DataStore provides a saveOrUpdate
method to use for upserts.
If the primary key(in this case an id
) is provided, the DataStore will
try to update the existing document if it exists, if it does not exist
or no primary key was provided, the DataStore saves the data as a new document.