[ 
https://issues.apache.org/jira/browse/TINKERPOP3-676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marko A. Rodriguez closed TINKERPOP3-676.
-----------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0.GA
         Assignee: Marko A. Rodriguez

This has been fixed since `has(key)` is now represented using `WhereStep` under 
the hood.

{code}
gremlin> g = TinkerFactory.createTheCrew().traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:14], standard]
gremlin> g.V().has('location')
==>v[1]
==>v[7]
==>v[8]
==>v[9]
gremlin> g.V().has('location').toString()
==>[GraphStep([],vertex), WhereStep(global,[PropertiesStep([location],value)])]
{code}

> has('key') with multi property
> ------------------------------
>
>                 Key: TINKERPOP3-676
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-676
>             Project: TinkerPop 3
>          Issue Type: Bug
>          Components: process
>            Reporter: Matt Frantz
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.0.0.GA
>
>
> Seems that if an {{Element}} has more than one instance of property "foo", it 
> ought to satisfy {{has('foo')}}.  Instead, we see an exception.
> {noformat}
> gremlin> g = TinkerFactory.createTheCrew().traversal()
> gremlin> g.V().has('location')
> Multiple properties exist for the provided key, use 
> Vertex.properties(location)
> {noformat}
> Not sure if this is TinkerGraph or process.  Here is the stack trace.
> {noformat}
> java.lang.IllegalStateException: Multiple properties exist for the provided 
> key, use Vertex.properties(location)
>       at 
> org.apache.tinkerpop.gremlin.structure.Vertex$Exceptions.multiplePropertiesExistForProvidedKey(Vertex.java:174)
>       at 
> org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex.property(TinkerVertex.java:77)
>       at 
> org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex.property(TinkerVertex.java:44)
>       at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer.test(HasContainer.java:93)
>       at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer.testAll(HasContainer.java:114)
>       at 
> org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.step.sideEffect.TinkerGraphStep.iteratorList(TinkerGraphStep.java:104)
>       at 
> org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.step.sideEffect.TinkerGraphStep.vertices(TinkerGraphStep.java:77)
>       at 
> org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.step.sideEffect.TinkerGraphStep.lambda$new$37(TinkerGraphStep.java:52)
>       at 
> org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.step.sideEffect.TinkerGraphStep$$Lambda$30/583559449.get(Unknown
>  Source)
>       at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep.processNextStart(GraphStep.java:97)
>       at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:135)
>       at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:117)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to