Author: mputz
Date: 2009-07-08 06:53:04 -0400 (Wed, 08 Jul 2009)
New Revision: 13530
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/hibernate/portal/domain.hbm.xml
Log:
JBPORTAL-2384: Fix hibernate mappings to address N+1 select problem on accessing
ObjectNode.children
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/hibernate/portal/domain.hbm.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/hibernate/portal/domain.hbm.xml 2009-07-07
23:59:53 UTC (rev 13529)
+++
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/hibernate/portal/domain.hbm.xml 2009-07-08
10:53:04 UTC (rev 13530)
@@ -54,7 +54,7 @@
name="children"
inverse="true"
cascade="none"
- fetch="select"
+ fetch="subselect"
lazy="true">
<cache usage="@portal.hibernate.cache.usage(a)"/>
<key column="PARENT_KEY"/>
@@ -73,7 +73,9 @@
name="object"
class="org.jboss.portal.core.impl.model.portal.PortalObjectImpl"
cascade="none"
- fetch="select">
+ fetch="join"
+ constrained="true"
+ lazy="false">
</one-to-one>
<map
name="securityConstraints"
Show replies by date