SpringBoot JPA creating wrong JPQL and throwing org.hibernate.exception.SQLGrammarException My entities has OneToMany relation. Below is the code: