Hello,
Did you iterate your traversal?
graph.tx().open(); g.addV().iterate(); graph.tx().commit();
Marko.
http://markorodriguez.com
On May 21, 2015, at 10:00 AM, Dylan Millikin <[email protected]> wrote:
> Hey,
>
> This one is somewhat obvious but a little bit of a pain and worth
> discussing.
> I'm using the titan09 branch and gremlin-console M9-RC3 to test these
> (default configuration)
>
> Basically these two queries don't yield the same results:
>
> graph.tx().open(); graph.addVertex(); graph.tx().commit();
>
> Which will behave as expected and add a vertex
>
> &&
>
> graph.tx().open(); g.addV(); graph.tx().commit();
>
> Doesn't add any vertex. I understand why, I'm just not sure this is
> comfortable behavior (or even wanted behavior).
> Furthermore the following doesn't work either:
>
> graph.tx().open(); m = graph.traversal(); m.addV(); graph.tx().commit();
>
> So, as handy as addV() is, it's behavior is inconsistent and dependent on
> context. That query you wrote and that worked fine will suddenly stop
> working if it's called from within a transaction. (unit tests will pass but
> integration tests will fail)
>
> Has this been discussed already? It looks like a potential headache.