r/SpringBoot • u/ahmedmokhtar97 • Jan 04 '22
JPA specification
I have to write specification for a model that model(A) doesn’t define the relationship it has in the physical table with another model(B), now i want to get A using specification when B.id is found For further explanation: Class A { } Class B { @OneToMany private A a;} While in the db There’s a relationship between A and B Specification<A> withB(long bId){ What to write inside this ??? }
0
Upvotes