You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by Daniel Kuppitz <me...@gremlin.guru> on 2016/09/16 16:25:32 UTC
[INFO] Recent changes in has() method signatures
Hello,
I've recently changes the signatures of our has() methods. Unfortunately I
didn't realize that this change was breaking for some users (those who
arrays as arguments). The old method signatures were all vararg-based:
- hasId(Object... ids)
- hasLabel(Object... labels)
- etc.
...and I mainly changed that to prevent method calls like hasId() with no
args. Since none of our test cases uses arrays, I didn't notice that this
change broke the following queries:
- __.hasId([1] as Object[])
- __.hasLabel(["person"] as Object[])
- etc.
Single entry arrays, that are used as the only arguments, are now treated
as P.eq(arr), but were treated as P.eq(arr[0]) before. I created a PR [1]
with a fix and also added a test that ensures that the new method
signatures behave like the old vararg method signatures (except that they
don't allow you to use no args).
Sorry for any inconvenience.
[1] https://github.com/apache/tinkerpop/pull/425
Cheers,
Daniel