module RethinkORM::Persistence
Direct including types
Defined in:
rethinkdb-orm/persistence.crInstance Method Summary
- 
        #delete
        
          Only deletes document from table. 
- 
        #destroy
        
          Destroy object, run destroy callbacks and update associations 
- #destroyed
- #destroyed=(destroyed)
- #destroyed?
- 
        #new_record?
        
          Id generated on save or set on load 
- #persisted?
- 
        #reload!
        
          Reload the model in place. 
- 
        #save(**options)
        
          Saves the model. 
- 
        #save!(**options)
        
          Saves the model. 
- 
        #update(**attributes)
        
          Updates the model 
- 
        #update!(**attributes)
        
          Updates the model in place 
- 
        #update_fields(**attributes)
        
          Atomically update specified fields, without running callbacks 
Instance Method Detail
Reload the model in place.
Throws
- RethinkORM::Error::DocumentNotSaved : If document was not previously persisted
- RethinkORM::Error::DocumentNotFound : If document fails to load
Saves the model.
If the model is new, a record gets created in the database, otherwise the existing record gets updated.
Saves the model.
If the model is new, a record gets created in the database, otherwise the existing record gets updated. Raises RethinkORM::Error:DocumentInvalid on validation failure
Updates the model
Non-atomic updates are required for multidocument updates
Updates the model in place
Throws RethinkORM::Error::DocumentInvalid on update failure