orientdb db.save "object is ambiguous" error

98 Views Asked by At

I'm using release orientdb-community-2.1.9.

Following example in docs (http://orientdb.com/docs/2.1/Functions.html) I tried:

return db.save({

"@class": "V",
log: 'test'

});

And I've got this error:

Error on parsing script at position #0: Error on execution of the script\nScript: test\n------^\nsun.org.mozilla.javascript.EvaluatorException: The choice of Java method com.orientechnologies.orient.core.command.script.OScriptDocumentDatabaseWrapper.save matching JavaScript argument types (object) is ambiguous; candidate methods are: \n class com.orientechnologies.orient.core.record.impl.ODocument save(com.orientechnologies.orient.core.record.ORecord)\n class com.orientechnologies.orient.core.record.impl.ODocument save(java.util.Map) (#360) in at line number 360\nThe choice of Java method com.orientechnologies.orient.core.command.script.OScriptDocumentDatabaseWrapper.save matching JavaScript argument types (object) is ambiguous; candidate methods are: \n class com.orientechnologies.orient.core.record.impl.ODocument save(com.orientechnologies.orient.core.record.ORecord)\n class com.orientechnologies.orient.core.record.impl.ODocument save(java.util.Map) (#360)

How can I correct this ambiguity?

Thanks Luca

0

There are 0 best solutions below