identity() on Neptune on a vertex

Hey all, hope you're doing well. I'm seeing an interesting behavior in Neptune (and also local gremlin server) where doing identity() on a vertex returns its id, label and the "properties" object. However the object is undefined even though it has some properties such as userId. Is this a known behavior?
Solution:
I believe this is expected. As this post pertains to javascript, I seem to recall that properties was placed there with the idea that there was future potential to include actual properties on elements. There is a long history for why we do not yet do that and you can read about it here: https://lists.apache.org/thread.html/e959e85d4f8b3d46d281f2742a6e574c7d27c54bfc52f802f7c04af3%40%3Cdev.tinkerpop.apache.org%3E That said, we are working on finally implementing this functionality which will a...
GitHub
TINKERPOP-2824 [WIP] Properties on response elements by vkagamlyk ·...
Current status: added finalization strategy DetachStrategy(mode, properties) added unit tests for DetachedVertex and DetachedEdge Next: integration tests implementations for GLV's Jira tick...
Jump to solution
4 Replies
Solution
spmallette
spmallette2y ago
I believe this is expected. As this post pertains to javascript, I seem to recall that properties was placed there with the idea that there was future potential to include actual properties on elements. There is a long history for why we do not yet do that and you can read about it here: https://lists.apache.org/thread.html/e959e85d4f8b3d46d281f2742a6e574c7d27c54bfc52f802f7c04af3%40%3Cdev.tinkerpop.apache.org%3E That said, we are working on finally implementing this functionality which will arrive in a future version, like 3.7.x: https://github.com/apache/tinkerpop/pull/1843
GitHub
TINKERPOP-2824 [WIP] Properties on response elements by vkagamlyk ·...
Current status: added finalization strategy DetachStrategy(mode, properties) added unit tests for DetachedVertex and DetachedEdge Next: integration tests implementations for GLV's Jira tick...
Shush
Shush2y ago
That was a great read, thank you for that! As the blog said, we were indeed confused on why we were seeing the "properties: undefined" object But I understand why it's there - it's just a reference and not the actual vertex. Still, it raises the question why there is a "properties" key returned at all in that case - wouldn't it be easier to omit it in the cases where it's undefined?
spmallette
spmallette2y ago
i sense "properties" was just a hold over from some indecision on how/when we'd do TINKERPOP-2824 and it was just never removed. sorry for the confusion.
Shush
Shush2y ago
No worries, thanks for the quick reply. Also, I enjoy the new form of forum posts for questions like those.
Want results from more Discord servers?
Add your server