Why JPA return null while the same query in Postgres returns a row?