Hello,
In my query I traverse to an edge. The result must contain the meta information of the edge (inV(), outV(), ...) and the properties.
schema
schema.vertexLabel('Vertex1').ifNotExists().partitionBy('id', UUID).create() schema.vertexLabel('Vertex2').ifNotExists().partitionBy('id', UUID).create() schema.edgeLabel('Edge'). ifNotExists(). from('Vertex1').to('Vertex2'). property('id', UUID). property('property1', Text). property('property2', Text). create()
data
g.addV('Vertex1').property('id', '1dacdea2-24aa-440d-a130-2c1b06ffed13' as UUID).next() g.addV('Vertex2').property('id', '9673a3bb-8d94-40fe-9e27-c11c3edb56b7' as UUID).next() g.V().hasLabel('Vertex1').has('id', '1dacdea2-24aa-440d-a130-2c1b06ffed13' as UUID).as('v1') .V().hasLabel('Vertex2').has('id', '9673a3bb-8d94-40fe-9e27-c11c3edb56b7' as UUID).as('v2') .addE('Edge') .property('id', UUID.randomUUID()) .property('property1', 'Text1') .property('property2', 'Text2') .from('v1').to('v2')
query (not working, very simple version)
g.E().project('in', 'out', 'properties') .by(inV()) .by(outV()) .by(properties())
result
{ "in": { "id": "dseg:/Vertex2/9673a3bb-8d94-40fe-9e27-c11c3edb56b7", "label": "Vertex2", "type": "vertex", "properties": {} }, "out": { "id": "dseg:/Vertex1/1dacdea2-24aa-440d-a130-2c1b06ffed13", "label": "Vertex1", "type": "vertex", "properties": {} }, "properties": { "key": "property2", "value": "Text2" } }
As you can see in the result, I get the information of the in and out Vertex, but the properties are not complete.
What are the correct steps to get this information in one result entry?
Thanks in Advance
Josef