Reputation: 2434
I'm trying to create user Notification whenever any user comments on user's post.
i'm using following gremlin query -
g.v(512).outE('Notification').order{it.b.PostedDate <=> it.a.PostedDate}[0..3].transform{ [notificationInfo:it,postInfo:it.inV]}
and am getting following result -
Am getting NotificationInitiatedByVertexId value in edge. how can I use that vertex id (ie. NotificationInitiatedByVertexId: 1280) to get information about the vertex in the same query result.
Upvotes: 0
Views: 105
Reputation: 6792
I would suggest trying to add it to the transform statement you already have:
g.v(512).outE('Notification').order{it.b.PostedDate <=> it.a.PostedDate}[0..3].transform{ [notificationInfo:it,postInfo:it.inV,notifiedV:g.v(it.NotificationInitiatedByVertexId)]}
Upvotes: 2