How to link directly to a thing


How do I associate an entity directly to another entity? If I have uid1 and uid2, for my two entities, and I do :a uid1 worksFor uid2 label ., then g.V("uid1").out("worksFor").toValue() will be "uid2", not entity with UID uid2, which means I can’t traverse past this connection, like

g.V("uid1").out("worksFor").out("employees").forEach( ...

Also, isn’t it the case that the worksFor predicate should contain a reference directly to our 2nd entity to keep traversals efficient?


Never mind. I see now that this is not an issue, the traversal just works. I was mixed up with concepts from a different database system.