database_path = 'test.kryo'
graph_orginal = TinkerGraph.open()
vertex_orginial = graph_orginal.addVertex()
vertex_orginial.property(Cardinality.set, u'foo', u'Bar')
vertex_orginial.property(Cardinality.set, u'foo', u'Baz')
graph_orginal.io(IoCore.gryo()).writeGraph(database_path)
graph_loaded = TinkerGraph.open()
graph_loaded.io(IoCore.gryo()).readGraph(database_path)
print 'Original:'
for vp in vertex_orginial.properties():
print vp
print 'Loaded:'
for vertex_loaded in graph_loaded.vertices():
for vp in vertex_loaded.properties():
print vp
Original
vp[foo->Bar]
vp[foo->Baz]
Loaded
vp[foo->Baz]
defaultVertexPropertyCardinality
setting. For example, if a .gryo
file is known to contain multi-property data, be sure to set the default cardinality to list
or else the data will import as single
. Consider the following:--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/83b57301-6f54-4211-a5c5-47d2d2e81750%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robert Dale
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.