Spring Data NEO4J: relations have null values
graph, neo4j, spring, spring-data-neo4j
Solution
One night spent: I have to add the @Fetch entity. Makes sense from my point of view, as if there was eagerly loading enabled, I could easily generate cycles :)
Problem
I have a spring 3.1 (Milestone) and Spring Data Neo4J 2.1 RC project running set up. All starts up properly and the neo4j database is being populated as desired, also visible in neoclipse. Now I fetch an entity (lets call it Container.java) by id and have the relation "Event". The relation in Container.java is modelled as follows: ``` @RelatedTo(type="HAS_EVENTS", direction = Direction.BOTH) Set<Event> events = new HashSet<Event>(); ``` When I access container.getEvents() and iterate over them, I can see that the single event has an id, but all other properties are null :( When having a look with neoclipse, all properties are saved as they should be. Is there some kind of "eager" or "lazy" loading? I do not use a @RelationshipType.