Entity class with a field annotated with @OneToMany and @JoinTable causes simple id = ? predicate to be transformed into complex (id) in select .. join .... This produces very slow query, not to mention additional db locks. Test casehttps://github.com/el-dot/hibernate-test-case-redundant-join-in-statement Expected statementupdate Parent set someField=? where id =?` Actual statementupdate Parent set someField=? where (id) in (select jpaunittes0_.id as id from Parent jpaunittes0_ left outer join parent_child jpaunittes0_1_ on jpaunittes0_.id=jpaunittes0_1_.id where jpaunittes0_.id=?) |