Seems like it works if I pass the document itself, instead of its temporary RecordID.
https://github.com/orientechnologies/orientdb/blob/master/core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeRID.java#L143 Is that the answer? When creating 1-N/N-M relationships inside a transaction, one has to pass the record itself and not only its RecordID, whereas RecordID is sufficient if previously inserted? Le mercredi 29 octobre 2014 10:16:27 UTC+1, Arnaud BOS a écrit : > > Hello, > > I'm running into the following exception when trying to insert inside the > same transaction a document and another one referencing the first one > inside a LINKSET: > > OTransactionException Cannot insert item in mvrb-tree because the > transactional item was not found. > com.orientechnologies.orient.core.type.tree.OMVRBTreeRID.internalPut > (OMVRBTreeRID.java:140) > > For the record, I'm using the clj-orient wrapper for Clojure. > > I've tested the following: > > * Begin transaction, create document A {:foo "bar"}, insert document A, > get RID, create document B {:link RID}, insert document B, commit --> > Success > * Begin transaction, create document A {:foo "bar"}, insert document A, > get RID, create document B {:link #{RID}}, insert document B > --> OTransactionException > > Note: Doing the second example with the RID of a document saved in a > previous transaction raises no error. > > I'm using OrientDB community edition v1.7.8. > > What could cause this error? Is there a problem with LINKSETs and > temporary RecordIDs ? > -- --- 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.
