Announcement Announcement Module
No announcement yet.
Spring Data NEO4J: relations have null values Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Data NEO4J: relations have null values

    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 by id and have the relation "Event".

    The relation in 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.

    Thanks for any hint to the right direction!

  • #2
    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