-
Notifications
You must be signed in to change notification settings - Fork 3
Model Instances
Garry but Spinning edited this page Jul 1, 2021
·
2 revisions
ModelInstances are created whenever you call a Model object, basically a row
-
ModelInstance:save(function callback)
: Saves the current instance into the database -
ModelInstance:delete(function callback)
: Deletes the current instance from the database and marks itself deleted -
ModelInstance:deleted()
: Returns if the current instance is deleted (ONLY AVAILABLE ONCE THE OBJECT IS DELETED ITSELF)