Hibernate Issuing select statement even if FetchMode = Join

Remove the fetch=FetchType.EAGER. Eager fetching triggers cascading select statements.

If you are using explicit HQL query e.g. “from User where something = someValue”, Hibernate will not respect the annotated Fetch mode. You would need to specify the join in the HQL query or the fetch mode in the criteria.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)