[
https://issues.apache.org/jira/browse/TINKERPOP-2824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17701406#comment-17701406
]
ASF GitHub Bot commented on TINKERPOP-2824:
-------------------------------------------
xiazcy commented on code in PR #1992:
URL: https://github.com/apache/tinkerpop/pull/1992#discussion_r1137732816
##########
docs/src/dev/provider/index.asciidoc:
##########
@@ -194,7 +194,8 @@ The following bullets provide some tips to consider when
implementing the struct
* `VertexProperty`
** This interface is both a `Property` and an `Element` as `VertexProperty` is
a first-class graph element in that it
can have its own properties (i.e. meta-properties). Even if the implementation
does not intend to support
-meta-properties, the `VertexProperty` needs to be implemented as an `Element`.
+meta-properties, the `VertexProperty` needs to be implemented as an `Element`.
`VertexProperty` should return empty
+iterable for properties if not support meta-properties.
Review Comment:
```suggestion
iterable for properties if meta-properties is not supported.
```
##########
docs/src/upgrade/release-3.7.x.asciidoc:
##########
@@ -29,6 +29,74 @@ Please see the
link:https://github.com/apache/tinkerpop/blob/3.7.0/CHANGELOG.asc
=== Upgrading for Users
+==== Properties on Elements
+
+===== Introduction
+
+By default properties on `Element` are now returned for OLTP requests. Gremlin
Server 3.5 and 3.6 can return properties only in some special cases.
+More history details about serialization of properties can be found in the
link:https://lists.apache.org/thread/xltcon4zxnwq4fyw2r2126syyrqm8spy[Stephen's
post].
+
+===== Behavior for OLAP queries
+
+Queries still won't return properties on Elements. The main reason for this is
performance considerations.
+If you need to get a property, then this can be explicitly configured with
`HaltedTraverserStrategy`
+
+[source,java]
+----
+ g.withComputer().withStrategies(HaltedTraverserFactoryStrategy.detached())
+----
+
+===== Output comparison for Gremlin Server 3.5/3.6 and 3.7
+
+Let's take a closer look at a Javascript GLV code example in 3.6 and 3.7:
+
+[source,javascript]
+----
+ const client = new Client('ws://localhost:8182/gremlin',{traversalSource:
'gmodern'});
+ await client.open();
+ const result = await client.submit('g.V(1)');
+ console.log(JSON.stringify(result.first()));
+ await client.close();
+----
+
+The result will be different depending on the version of Gremlin Server.
+For 3.5/3.6:
+[source,json]
+----
+ {"id":1,"label":"person"}
+----
+
+For 3.7:
+[source,json]
+----
+
{"id":1,"label":"person","properties":{"name":[{"id":0,"label":"name","value":"marko","key":"name"}],"age":[{"id":1,"label":"age","value":29,"key":"age"}]}}
+--
> Properties on Elements
> ----------------------
>
> Key: TINKERPOP-2824
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2824
> Project: TinkerPop
> Issue Type: Improvement
> Components: dotnet, driver, go, javascript, process, python
> Affects Versions: 3.5.4
> Reporter: Valentyn Kahamlyk
> Assignee: Valentyn Kahamlyk
> Priority: Major
> Labels: breaking
>
> Problem: When a user writes `g.V()` they get back a Vertex object. The
> problem is that depending on the execution context of the traversal, the
> result could be quite different, with or without properties.
> Solution: Implement new finalization strategy DetachStrategy(detachMode,
> properties) where mode is one of ALL, NONE or CUSTOM. `properties` is list of
> properties name, are taken into account only for CUSTOM mode.
> Discussion thread in dev list: [Proposal to handle properties on response
> Elements-Apache Mail
> Archives|https://lists.apache.org/thread/l8rw7ydj7kym8vhtwk50nhbp45ng9986]
> Stephen's thread in dev list: [The Issue of Detachment-Apache Mail
> Archives|https://lists.apache.org/thread/xltcon4zxnwq4fyw2r2126syyrqm8spy]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)