Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1088

Preserve Cardinality in Subgraph

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-incubating
    • Fix Version/s: 3.1.3, 3.2.1
    • Component/s: process
    • Labels:
      None

      Description

      Originally reported here:

      https://groups.google.com/d/msg/aureliusgraphs/qKvGZOWpNtY/ivd6qc_iAAAJ

      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.

      I think this can be fixed by explicitly using:

      public <V> VertexProperty<V> property(final VertexProperty.Cardinality cardinality, final String key, final V value, final Object... keyValues);
      

      Currently the cardinality check is occurring by default but against the target graph and not the source graph (so you get the wrong cardinality).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                spmallette Stephen Mallette
                Reporter:
                spmallette Stephen Mallette
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: