The following usage pattern will cause an IllegalStateException when accessing the property:
// isPresent() yields "false"
if (edge.property("my_prop").isPresent()) {
edge.value("my_prop");
}
edge.property("my_prop","some_value");
// isPresent() yields "true"
if (edge.property("my_prop").isPresent()) {
edge.value("my_prop"); // retrieves string value as expected
}
// Appears to remove the value, but not the property itself.
edge.properties("my_prop").forEachRemaining(prop -> prop.remove());
// isPresent() still yields "true"
if (edge.property("my_prop").isPresent()) {
edge.value("my_prop"); // throws java.lang.IllegalStateException
}
The problem can be worked around be reloading the edge from the graph (no commit required) every time a property is added or removed.
Vertex properties do not have this issue. Their presence state always reflects the addition or removal of a property.
The following usage pattern will cause an
IllegalStateException
when accessing the property:The problem can be worked around be reloading the edge from the graph (no commit required) every time a property is added or removed. Vertex properties do not have this issue. Their presence state always reflects the addition or removal of a property.