Hi,
I know that SDN 3.X.X is not full tested yet but I come across this potential bug, and I would like to know if it is a "known" one:
I have an acceptance test written using Specs2 (using a pretty DSL) containing this:
meetingRepository.findAllParticipants(meetingId) must have size 3 //works, asserting 3, since it's a custom query I wrote in the meetingRepository to prove that the second line doesn't work
meetingRepository.findById(meetingId).participants must have size 3 // instead of asserting 3, it always displays "containing 2, not 3"
My custom query is:
@Query("MATCH (m:Meeting {_id: {0}})<-[:PARTICIPATES]-(participant) return participant")
def findAllParticipants(meetingId: String): EndResult[Participant]
The bug therefore concerns the @Fetch annotation that is above the Participants Set, in the class Meeting:
@org.springframework.data.neo4j.annotation.Fetch
@org.springframework.data.neo4j.annotation.RelatedTo(`type` = "PARTICIPATES", direction = Direction.INCOMING)
var participants: java.util.Set[Participant] = new util.HashSet[Participant]
I don't figure out why it doesn't return all the participants but only 2.
I even test with the Rest mode database, to be sure to see the 3 participants saved, just before the line "meetingRepository.findById(meetingId).participants must have size 3" is executed. And there are the 3 elements as expected in the rest database.
Is it possible to check it with a possible SDN unit test ? If there is one concerning the fetch annotation of course.
Thanks a lot,
Michael