Hibernate selects MAP optimization (collapses SELECT statements)

How to get a card without additional operators of choice.

I have hbm:

<map name="officeSet" table="office_employee" inverse="true" lazy="false" batch-size="100" cascade="all"> <key column="employee_id"/> <map-key-many-to-many column="office_id" class="by.epam.hibernatetask.model.Office"/> <element column="employee_position" type="java.lang.String"/> </map> 

with lazy = "false" and fetch = "join" I can get SET for three sleeping requests, but it does not work for MAP. Cannot find a solution.

+4
source share

Source: https://habr.com/ru/post/1339354/


All Articles