I saw these annotations on Spring Data Orientdb project and I'm wondering if I can use it on java pojo objects to create vertices and relationships.
The scenario will be something like that:
@Vertex
public class User{
@Edge
public class Follow {
OrientGraph orientGraph = factory.getTx();
User george = new User();
User richard = new User();
Follow follow = new Follow();
orientGraph.addEdge(null, george, richard, follow);
It doesn't work because the addEdge method needs 2 Vertex classes and Edge class. Maybe annotations is not suited for this.
I use the orientdb Studio and seems to be very simple to create Objects that inherit from V(Vertex) and E(Edge) classes and link each others. I'm wondering something like that in java code.
Does anyone has same use case scenario? Possible solutions or approaches? Thanks