"Going into the orient-specific API and getting the underlying record works 
but changing the map on the record doesn't save the changes at 
transaction's end."

That is interesting, at first I thought that the returned map itself 
probably isn't "managed", that it is a copy of some internal LINKMAP 
strucutre ... this way it would make sense that changes are not propagated 
and re-seting the field with updated map is necessary.
However you will actually obtain instance of ORecordLazyMap:

Lazy implementation of LinkedHashMap. It's bound to a source ORecord object 
to keep track of changes. This avoid to call the makeDirty() by hand when 
the map is changed.

So I tested this and it's all true, the document is dirty, but changes are 
not commited. Why? 

WHEN WORKING WITH DOCUMENT API YOU HAVE TO EXPLICITELY CALL ODocument.save()

Here is an example:

Vertex v = graph.getVertex("#x:y");
Map<String, Vertex> map = v.getRecord().field("linkMap", OType.LINKMAP);
map.remove("v1");
v.getRecord().save();
graph.shutdown(); // or graph.commit();

-- 

--- 
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.

Reply via email to