Hi Erik, for other tips take a look at: https://github.com/orientechnologies/orientdb/wiki/Scala-Language
And feel free to improve that page. Lvc@ On 26 February 2014 08:19, Erik Peterson <[email protected]> wrote: > The answer is to force a varg call... > > val v:Vertex = graph.addVertex(null,Nil: _*) > > On Wednesday, February 26, 2014 12:08:30 AM UTC-7, Erik Peterson wrote: >> >> Looks like this is biting OrientDB with Scala again. Simply trying to >> create a vertex won't compile due to ambiguous reference. Anyone have a >> workaround? >> >> Here's the code... >> >> import org.scalatest.FlatSpec >> >> import com.tinkerpop.blueprints.impls.orient.OrientGraph >> >> import com.tinkerpop.blueprints.Vertex >> >> >> class OrientDBSpec extends FlatSpec { >> >> behavior of "The OrientDB Spec" >> >> it should "open and close in memory graph db" in { >> >> >> >> val graph = new OrientGraph("memory:test") >> >> try { >> >> val v:Vertex = graph.addVertex(null) >> >> println("Created vertex: " + v.getId) >> >> } finally { >> >> graph.shutdown >> >> } }} >> >> And the error... >> >> Multiple markers at this line >> >> - ambiguous reference to overloaded definition, both method addVertex >> in class OrientBaseGraph of type (x$1: Any, x$2: >> >> <repeated...>[Object])com.tinkerpop.blueprints.impls.orient.OrientVertex >> and method addVertex in class OrientBaseGraph of type (x$1: >> >> Any)com.tinkerpop.blueprints.impls.orient.OrientVertex match argument >> types (String) and expected result type com.tinkerpop.blueprints.Vertex >> >> - ambiguous reference to overloaded definition, both method addVertex in >> class OrientBaseGraph of type (x$1: Any, x$2: >> >> <repeated...>[Object])com.tinkerpop.blueprints.impls.orient.OrientVertex >> and method addVertex in class OrientBaseGraph of type (x$1: >> >> Any)com.tinkerpop.blueprints.impls.orient.OrientVertex match argument >> types (Null) and expected result type com.tinkerpop.blueprints.Vertex >> > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
