Method: PEROBS::ObjectBase#_sync

Defined in:
lib/perobs/ObjectBase.rb

#_syncObject

Write the object into the backing store database.



208
209
210
211
212
213
214
215
216
217
218
# File 'lib/perobs/ObjectBase.rb', line 208

def _sync
  # Reset the stash map to ensure that it's reset before the next
  # transaction is being started.
  @_stash_map = nil

  db_obj = {
    'class_id' => @store.class_map.class_to_id(self.class.to_s),
    'data' => _serialize
  }
  @store.db.put_object(db_obj, @_id)
end