java.lang.IllegalArgumentException: Argument 'sale' is not a RecordId in form of string. Format must be: <cluster-id>:<cluster-position> at com.orientechnologies.orient.core.id.ORecordId.fromString(ORecordId.java:251) at com.orientechnologies.orient.core.id.ORecordId.<init>(ORecordId.java:62) at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.validateLink(ORecordSchemaAwareAbstract.java:409) at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.validateField(ORecordSchemaAwareAbstract.java:229) at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.validate(ORecordSchemaAwareAbstract.java:74) at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1380) at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1370) at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1359) at com.tinkerpop.blueprints.impls.orient.OrientElement.save(OrientElement.java:150) at com.tinkerpop.blueprints.impls.orient.OrientElement.save(OrientElement.java:133) at com.tinkerpop.blueprints.impls.orient.OrientElement.getIdentity(OrientElement.java:180) at com.tinkerpop.blueprints.impls.orient.OrientElement.getId(OrientElement.java:129) at com.tinkerpop.blueprints.impls.orient.OrientVertex.toString(OrientVertex.java:446) at java.lang.String.valueOf(String.java:2854) at java.lang.StringBuilder.append(StringBuilder.java:128)
On Monday, 24 March 2014 12:06:59 UTC, [email protected] wrote: > > Hi, > > Now I get the following error: > > - Argument 'sale' is not a RecordId in form of string. Format must be: > <cluster-id>:<cluster-position> > > > What I'm doing is the equivilent of the following: > > Properties props = new Properties(); > > props.put("entity_ref", "checkoutprocess/nocaptcha/sale"); > > props.put("variant", "nocaptcha"); > > props.put("registered_at", "Mon Mar 24 12:03:44 GMT 2014"); > > props.put("outcome","sale"); > > OrientVertex newEntity = graph.addTemporaryVertex("SomeClass", props); > > newEntity.save(); > > > Any ideas? > > On Monday, 24 March 2014 11:47:59 UTC, [email protected] wrote: >> >> >> Ok, I just created the properties from my Map :) duh! >> >> >> On Monday, 24 March 2014 11:41:46 UTC, [email protected] wrote: >>> >>> Hi, >>> >>> I'm adding a vertex with graph.addTemporaryVertex(<type>,<fields> ...). >>> -> addTemporaryVertex(java.lang.String iClassName, java.lang.Object... prop) >>> >>> If the Vertex type requires a field it's validated when created, not >>> when saved. >>> >>> This means that this is out of the question: >>> >>> 1. newVertex = graph.addTemporaryVertex("SomeClass","field"="value"); >>> 2. newVertex.setProperty("required_field","some value" >>> >>> This is a generic code I'm using and I have a Map containing "additional >>> field values". >>> If there is a way to use a Map for properties? >>> addTemporaryVertex("SomeClass", (Map) someMapWithProperties) -> >>> (java.lang.String iClassName, java.lang.Object... prop) >>> >>> Any pointers? >>> >>> Regards, >>> -Stefán >>> >>> >>> -- --- 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/d/optout.
