[
https://issues.apache.org/jira/browse/TINKERPOP-2449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephen Mallette closed TINKERPOP-2449.
---------------------------------------
Resolution: Not A Bug
{{g.E()}} expect an option edge {{id}} not an edge {{label}}. To do it by edge
label you would do {{g.E().hasLabel('root')}}
> Get edges in a graph by label
> -----------------------------
>
> Key: TINKERPOP-2449
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2449
> Project: TinkerPop
> Issue Type: Bug
> Components: structure, tinkergraph
> Affects Versions: 3.4.8
> Environment: java with tinkergraph and tp3Version=3.4.8
> Reporter: Fredrick Eisele
> Priority: Major
>
> Given the presence of a node with a self-referential edge with label 'root' I
> expect the following to get that node.
> {code:java}
> List<Vertex> roots = g.E("root").outV().toList();
> {code}
> The roots list is empty.
> The following work-around gives me what I expect.
> {code:java}
> List<Vertex> roots = g.V().inE("root").outV().toList();
> {code}
> Here is a graphml fragment that illustrates the problem.
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <graphml xmlns="http://graphml.graphdrawing.org/xmlns"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
> http://graphml.graphdrawing.org/xmlns/1.1/graphml.xsd">
> <graph id="G" edgedefault="directed">
> <node id="0">
> <data key="labelV">BLANK</data>
> </node>
> <node id="1">
> <data key="labelV">component</data>
> </node>
>
> <edge id="2" source="1" target="1">
> <data key="labelE">root</data>
> </edge>
> </graph>
> </graphml>
> {code}
> I believe this has been a problem for a while...
> https://groups.google.com/g/gremlin-users/c/wVOnJAvHSSU
--
This message was sent by Atlassian Jira
(v8.3.4#803005)