Announcement Announcement Module
Collapse
No announcement yet.
Error in @RelatedTo Spring Data graph Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error in @RelatedTo Spring Data graph

    I am trying to play with Spring Data Graph with neo4j.

    My example model has to entities Artists and Albums.

    Artists "Perform" Albums is the relationship.

    My Artist Class looks like this
    @NodeEntity
    public class Artist {
    private Long id;
    @Indexed
    private String name;
    private String dob;
    private String bio;

    @RelatedTo(type="PERFORMS", elementClass=Album.class);
    private List<Album> albums;
    ...
    }
    Album Class:
    @NodeEntity
    public class Album {
    private Long id;
    private String name;
    private String year;
    private String description;
    private String type;
    private String language;
    ...
    }
    Now I have an error in the:
    @RelatedTo(type="PERFORMS", elementClass=Album.class);
    private List<Album> albums;
    It says: Cannot convert from Class<Album> to Class<? extends NodeBacked>

    Can someone help me with that?

    Thanks,
    Srikanth

  • #2
    What IDE are you using?

    If you use Eclipse please update the AspectJ plugin to the latest version: http://download.eclipse.org/tools/ajdt/36/dev/update

    Otherwise this is just an visual Editor error (that should be gone after the update). Maven should still build fine.

    Also you might have a look at the answer from Thomas Risberg on this:
    https://jira.springsource.org/browse/DATAGRAPH-39

    Comment

    Working...
    X