davebshow / goblin

A Python 3.5 rewrite of the TinkerPop 3 OGM Goblin
Other
93 stars 21 forks source link

Vertex property gets changed from Gremlin Console but not from Python/Goblin script #107

Open marciodebarros opened 6 years ago

marciodebarros commented 6 years ago

I have the following script to update a property on a vertex (janusgraph 0.2.0). When I run it from the Gremlin Console the value gets changed as expected:

g.V().hasLabel('airport').has('airport_code','ATL').fold().coalesce(__.V().hasLabel('airport').has('airport_code','ATL').property('airport_runways', 5),__.unfold()).next()

However, when I paste the same script on my python code, using gremlin_python(3.2.6) and goblin (2.1.0)

session = await app.session()

await session.g.V().hasLabel('airport').has('airport_code', 'ATL').fold().coalesce(
    __.V().hasLabel('airport').has('airport_code','ATL').property('airport_runways', 7),
    __.unfold()).next()

await session.flush()

The value for the airport_runways property does not get updated. Any suggestions on what could I be missing ?

davebshow commented 6 years ago

Not sure off the top of my head. Does Janus need a commit there? Have you tried it with Tinkergraph? If so, does it work there?

marciodebarros commented 6 years ago

Hi Dave, I haven't tried the same using Tinkergraph. How can I setup my Goblin app to connect to it ?