I am trying to see if Arango DB can be used in a Spring Data application. I know there is a Spring Data implementation for Arango but am having trouble getting it to work as I think it should. I guess my question is, if I have a parent object that has a child object as a field, is there any annotation on the child object field that will make the parent save off a relationship with the child?
class Parent {
private Child child;
Parent(Child child)
{
this.child = child;
}
}
class Child {
private String name;
Child(String name)
{
}
}
Is there a way that this command will create both the child and the parent and the relationship/edge between them?
repo.save(new Parent(new Child("sam"));
If the answer is that I have to save them all independently then I don't believe this is a very good implementation for Spring Data. To me I shouldn't have to have 3 different repos and make 3 different calls to save a simple object graph.
Any help would be gladly appreciated.