Method: ModelRecord#save

Defined in:
lib/model/the_record.rb

#saveObject

Saves the record by calling update or creating the record

ORD.create_class :a
a =  A.new
a.test = 'test'
a.save

a =  A.first
a.test = 'test'
a.save


228
229
230
231
232
233
234
235
# File 'lib/model/the_record.rb', line 228

def save
	transfer_content from:  if rid.rid?
														db.update self, attributes, version
													else
														db.create_record  self, attributes: attributes, cache: false 
													end
	ActiveOrient::Base.store_rid self
end