spmallette commented on code in PR #3243: URL: https://github.com/apache/tinkerpop/pull/3243#discussion_r2441250149
########## docs/src/upgrade/release-3.8.x.asciidoc: ########## @@ -305,6 +305,32 @@ The `asString()` step will no longer allow `null` input. An `IllegalArgumentExce See: link:https://lists.apache.org/thread/q76pgrvhprosb4lty63bnsnbw2ljyl7m[DISCUSS] thread +==== Removal of has(key, traversal) + +The current `has(key, traversal)` implementation has long caused confusion, as it only checks if the traversal produces +any result, rather than performing equality comparison with the traversal's output value. While fixing this behavior is +desirable, it would require extensive changes. Therefore, we are removing the current `has(key, traversal)` API as a +breaking change in version 3.8.0, with plans to reintroduce a properly implemented version in the next major release. + +Users needing to filter with traversals should use the `where()` step instead, which provides the expected traversal-based Review Comment: Is that the right advice? Looking at your example, `g.V().has("age", __.is(P.gt(30)))` i guess you could use `where`, but wouldn't you just do: `g.V().has("age", P.gt(30))`. What would be the point of `where`? I think the simple fact here is that there aren't a lot of people using `has(String,Traversal)` and if they are they are probably are doing something wrong and don't realize it. I think these upgrade docs need to acknowledge the confusion that's likely out there and help folks understand how to deal with it. If we just say, replace `has` with `where` and leave it at that, people will may just blindly follow that advice without considering the implications. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
