stephen mallette created TINKERPOP-1088:
-------------------------------------------
Summary: Preserve Cardinality in Subgraph
Key: TINKERPOP-1088
URL: https://issues.apache.org/jira/browse/TINKERPOP-1088
Project: TinkerPop
Issue Type: Bug
Components: process
Affects Versions: 3.1.0-incubating
Reporter: stephen mallette
Originally reported here:
https://groups.google.com/d/msg/aureliusgraphs/qKvGZOWpNtY/ivd6qc_iAAAJ
{quote}
I found the cardinality of properties are not preserved in the subgraph
generated by Gremlin 'Subgraph Step' (i.e. subgraph('sub').cap('sub')).
To be specific, in my case, I have several property keys with 'LIST'
cardinality (e.g. propertyKey: created)
so that there can be multiple properties for those keys.
e.g.
gremlin> v.properties()
=>vp[created->true]
=>vp[created->false]
=>vp[created->true]
(properties also have nested properties so they are not just simple duplication
of the same information)
However, when I generated subgraph from this graph,
only one of the properties using the same key is copied to the corresponding
vertex in the subgraph.
{quote}
I think this can be fixed by explicitly using:
{code}
public <V> VertexProperty<V> property(final VertexProperty.Cardinality
cardinality, final String key, final V value, final Object... keyValues);
{code}
Currently the cardinality check is occurring by default but against the target
graph and not the source graph (so you get the wrong cardinality).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)