Database Model
This is the base class for your models.
#
Model attributesobjects
#
This is the ObjectManager connected to the model, it provides interface to query the database.
#
Model instance methodsThis is the public model API intended for use. Feel free to extend these methods
save()
#
Store the model instance in the database updating the current database record given it was pulled from the database or creating new one otherwise.
Save calls create and update internally.
create()
#
Create new database record.
update()
#
Update existing database record.
delete()
#
Delete existing database record.
reload()
#
Query the database for current entity state and store it in the instance.
#
Model static methodscreate(values)
#
Creates an instance of model and immediately storese it in the database.