Method: ModelRecord#find

Defined in:
lib/model/the_record.rb

#find(attributes = {}) ⇒ Object

Fires a »where-Query» to the database starting with the current model-record.

Attributes:

  • a string ( obj.find “in().out().some_attribute >3” )

  • a hash ( obj.find ‘some_embedded_obj.name’ => ‘test’ )

  • an array

Returns the result-set, ie. a Query-Object which contains links to the addressed records.



94
95
96
97
# File 'lib/model/the_record.rb', line 94

def find attributes =  {}
  q = OrientSupport::OrientQuery.new from: self, where: attributes
  query q
end