开发者

Hibernate fetch MAP optimization (minimize SELECT statements)

How to fetch a map with no additional select statements.

I have a hbm like this:

            <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 fetch a SET for 3 hibernate queries but it doesn't work for MAP. Can't find the solution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜