Adding an edge to a non-existent vertex creates a shell vertex
Hi,
I recently noticed an odd behaviour when using the Java Janusgraph library (version 1.1.0) to add edges.
Adding an edge from an existing vertex S, to a non-existing vertex T, will automatically create an empty shell vertex for T.
Is this an intended and reliable behavior that is documented somewhere?
Simplified example:
This creates a shell vertex with the label
vertex
and no properties, which I can see from the gremlin console:
Other observations:
- Trying to add an edge through the gremlin console in the same way fails with an error about the non-existing target vertex
- Adding the missing vertex later using the Java library successfully adds the label and properties to the vertex, and preserves the previously-added edge
Thanks in advance!0 Replies