Yanming Zhou

Results 241 comments of Yanming Zhou
trafficstars

It's weird `BadJpqlGrammarException` is thrown since `nativeQuery` indicate the statement is SQL not JPQL, is it a known issue? @christophstrobl

> have you tried to do the same query with plain JPA/hibernate as well? ```java CriteriaBuilder cb = entityManager.getCriteriaBuilder(); CriteriaQuery cq = cb.createQuery(Book.class); Root root = cq.from(Book.class); cq.select(root).where(cb.equal(root.get("author").get("id"), homer.getId())); entityManager.createQuery(cq).getResultList();...

@scordio It works as expected if you downgrade hibernate to `6.2.20.Final` which is used by `3.1.8`, I confirm it is a regression introduced by hibernate 6.4.1.Final, I reported it to...

Here is workaround: ```java interface BookRepository extends JpaRepository { default List findAllByAuthorId(Long authorId) { Author author = new Author(); author.setId(authorId); return findAllByAuthor(author); } List findAllByAuthor(Author author); } ```

@scordio Could you try PR https://github.com/spring-projects/spring-data-jpa/pull/3374 ?

It should be fixed by https://github.com/spring-projects/spring-data-jpa/pull/3275

Please note this PR include bugfix not just improvement, it should be resolved ASAP.

It seems that the assignee not working for this project anymore, could you reassign another one? @mp911de