Author: pnguyen
Date: 2010-03-09 17:21:44 -0800 (Tue, 09 Mar 2010)
New Revision: 14367
URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14367
Modified:
trunk/src/org/hyperic/hq/authz/server/session/ResourceGroupDAO.java
Log:
[HQ-1309] Use "join" instead of "join fetch" so that the roles are lazy loaded.
Modified: trunk/src/org/hyperic/hq/authz/server/session/ResourceGroupDAO.java
===================================================================
--- trunk/src/org/hyperic/hq/authz/server/session/ResourceGroupDAO.java 2010-03-10 01:02:45 UTC (rev 14366)
+++ trunk/src/org/hyperic/hq/authz/server/session/ResourceGroupDAO.java 2010-03-10 01:21:44 UTC (rev 14367)
@@ -332,7 +332,7 @@
public Collection findByRoleIdAndSystem_orderName(Integer roleId,
boolean system,
boolean asc) {
- String sql = "select g from ResourceGroup g join fetch g.roles r " +
+ String sql = "select g from ResourceGroup g join g.roles r " +
"where r.id = ? and g.system = ? " +
"order by g.resource.sortName " + (asc ? "asc" : "desc");
return getSession().createQuery(sql)
|