new_block_id = self.g.addV().property('foo', bar).id().next()
edges = self.g.V(new_block_id).as_('new_block').V().has(T.id, P.within(children_vertices)).addE().from_('new_block').toList()
new_block_id = self.g.addV().property('foo', bar).id().next()print("ID created:" + str(new_block_id))
print("ID queried:" + str(self.g.V(new_block_id).toList()))
ID created: 1234
ID queried: []
g.addV().property('foo', 'bar').as('new_block').V().has('id', within([123, 456])).addE().from('new_block').select('new_block').id().next()
--
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/12d5794e-c6b5-40af-b958-d220ae0c3cb6%40googlegroups.com.
Not sure how you're calling addE() without a label. Maybe the python api lets you do this but the groovy/java api does not.
One thing I noticed is that in your first traversal, you use T.id. In later traversals, you use 'id'. These are two very distinctly different properties. Make sure you're using the one you expect.
I'll assume that you're running neo4j embedded in a remote gremlin server. BTW, which version of gremlin and neo4j are you running?
I haven't experienced your problem where a newly created vertex can not be immediately queried and I've loaded lots of data like this.
new_block = self.g.addV('block').property('hash', hash_str).property('txt', txt_str).id().next()
test = self.g.V(new_block).id().next()
# test = self.g.V().has('block', 'hash', hash_str).id().next()
new_block = self.g.addV('block').property('hash', hash_str).property('txt', txt_str).id().next()
time.sleep(0.1)
test = self.g.V(new_block).id().next()
# test = self.g.V().has('block', 'hash', hash_str).id().next()
--
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/138f28e7-9e27-4e06-9321-8db111d7c115%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/138f28e7-9e27-4e06-9321-8db111d7c115%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Robert Dale