Spring Data Neo4J & CRUD - How requesting an entity A based on an entity B, when A containing a collection of B

36 Views Asked by At

Basically, I have these entities:

@Entity
class A {
   Set<B> SetOfB
}

@Entity
class B {
    ...
}

And I need a method in my CRUD Repository allowing getting a List if A contains B in its SetOfB.

When I am using:

A findBySetOfBContains(B b)

I got:

The attribute 'setOfB' is not mapped to a Graph property!
1

There are 1 best solutions below

0
EddyA On

I found a workarround by searching for B before and using the uuid of B:

findBySetOfB_Uuid(String uuid)

That works well.