Skip to content

Problems with @To and @From annotation #43

@nordgreg

Description

@nordgreg

do the To and From annotations work in the spring data project?

when I try to retrieve edge documents using the From attribute, I get "nested exception is java.lang.StackOverflowError". I can see the docs and the edge in the database. but when I use the repository (actorRepository.findByName), i get the above error. When I remove the From annotation, I don't get that error

@Edge(value = "roles")
public class Role{
    @Id
    private String id;

    @From
    private Actor actor;

    @To
    private Movie movie;
}

@Document
public class Movie movie{
    @Id
    private String id;

    ...other stuff...
}

@Document
public class Actor actor{
    @Id
    private String id;
     
    private String name;


    ...other stuff...

    @From
    private List<Role> roles;

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions