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
        
        def reload!
        #
      
      
        Reload the model in place.
Raises
RethinkORM::Error::DocumentNotSavedif document was not previously persistedRethinkORM::Error::DocumentNotFoundif document fails to load
        
        def save(**options)
        #
      
      
        Saves the model.
If the model is new, a record gets created in the database, otherwise the existing record gets updated.
        
        def save!(**options)
        #
      
      
        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
        
        def update(**attributes)
        #
      
      
        Updates the model
Non-atomic updates are required for multidocument updates
        
        def update!(**attributes)
        #
      
      
        Updates the model in place
Raises RethinkORM::Error::DocumentInvalid on update failure