Updating an item

To perform an update operation, it is as simple as modifying the object and calling the save method on it again, to update that item in the database with its new values:

item.name = "Orange"try item.save() // This will update the name to Orange in database

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.