cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Relationship not mapped into @Relationship field spring boot 2.4 SDN 6

Hi,
i am wondering if this is normal, or how is it solvable.
Now the @RelationshipProperties class cant have a repository and be queried if i understand correctly.
But then when trying to get the relationship from the class with @Node, where it is saved in a list, it is not getting mapped into the Object.
Using @Query(MATCH()...)on the repository method(of @Node class), the field annotated with @Relationship is NULL, everything else is there, the id and all.
Then using the normal findById, it does get the same object, but with this the relationship is mapped into the @Relationship field.
Is this the best way to get the relationships, should i query once, then again with a normal spring data method?

Thanks,
Daniel

1 REPLY 1

Hello, Daniel! Thanks for your question.

You are correct that you now can't have a repository linked to a relationship entity and only have the @RelationshipProperties class. Could you send your @Node and @RelationshipProperties class code, and I'll take a look? My thought is that something is not mapped correctly between your entity classes, but I can see if I can spot it.

Cheers,
Jennifer