RethinkORM::Persistence
Instance methods
destroyed=(destroyed : Bool)
Sourcedestroyed?
Sourcepersisted?
Sourcereload!
Reload the model in place.
Raises
RethinkORM::Error::DocumentNotSavedif document was not previously persistedRethinkORM::Error::DocumentNotFoundif document fails to load
save
Saves the model.
If the model is new, a record gets created in the database, otherwise the existing record gets updated.
save!
Saves the model.
If the model is new, a record gets created in the database, otherwise the existing record gets updated.
Raises
RethinkORM::Error:DocumentNotSavedif was document was destroyed before saveRethinkORM::Error:DocumentNotSavedif was document was not saved by RethinkDBRethinkORM::Error:DocumentInvalidon validation failures
update!
Updates the model in place
Raises RethinkORM::Error::DocumentInvalid on update failure