I have been playing with OrientDB (2.0.4), Archimedes (2.5.0.0), and com.orientechnologies/orientdb-graphdb (2.0.5).
I can use the console to create subclasses of Vertex, and I can select records of these, but I can’t find how to create a new vertex of a specific class. Is that something that can be done, or is that an unsupported extension of OrientDB?
For example I have a database where there is a Course class extending Vertex.
orient.core> (v/find-by-kv og "@CLASS" "Course")
#{#<OrientVertex v(Course)[#14:0]> #<OrientVertex v(Course)[#14:1]>}
orient.core> (def c1 (v/find-by-id og "14:0"))
#'orient.core/c1
orient.core> (v/to-map c1)
{:__id__ #<ORecordId #14:0>, :rubric "cs331"}
orient.core> (v/create! og ?????)
I can only get the last create command to create a Vertex; never a Course.
Thanks,
Mattox
The problem is that I was trying to use keywords. If you use the string “@class” then it works.
core> (v/create! og { "@class" "Semester" :start "2014-01"})
#<OrientVertex v(Semester)[#-1:-2]>
Cheers,
Mattox