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


Reply With Quote