Skip to content

Changes 2.2 to 3.0

topofocus edited this page Apr 19, 2019 · 19 revisions
  • Simplified Initialization
 ORD= ActiveOrient::Init.connect   database: , user:, server:, port:
 ActiveOrient::Model.keep_models_without_file = true
 ActiveOrient::OrientDB.new  model_dir: 
  • ORD.create_class
    The method create_classes is gone. ORD.create_class takes a list of symbols and returns the created Class-Constants. An optional block takes a Class.
 > ORD.create_class( :a, :hugo, :Hugo_tester){ V }
  => [A, Hugo, HugoTester]
  • ORD.create_vertex_class and ORD.create_edge_class take a single symbol as well as a list of symbols

  • ORD.add_item_to_property has been removed. Use Model.property << item [,item, ..] instead

  • Embedded Lists and -Sets can be manipulated with "<<" (append) and "remove"

  • Support for unsaved List-Elements in Lists

   Model.{some_property} << Model2.new( some_attribute: some_value ) 

creates the Model2-Document and assigns it unidirectional to Model

  • Model.upsert and - Model.update replace ORD.upsert and ORD.update,

  • EdgeClass.create_edge instead of ORD.create_edge

  • EdgeClass.create_edge accepts only simple (single) arguments. Support for Arrays as arguments has been dropped

  • OrientQuery.nodes creates a outE(Edge_Class).in[condition] btw a inE(Edge_Class).out[condition] Projection for queries

  • Vertex.nodes jumps to adjacent vertices. (Filtering is applied, too)

  • Improved to_human methods for Vertices and Edges

  • Model_Class.query_database and Model_Object.query return an ActiveSupport::Array, any method defined in a model-file is thus delegated to the returned collection.

--- Prerelease GEM 0.79

Clone this wiki locally