dynamic-roles: remove unnecessary order by ID

On some MySQL server envs, this may cause a SQL statement error, though
I was unable to reproduce it. Since it's not needed, an order by 'sort_order'
is enough, we can safely remove it.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2016-05-18 13:46:18 +05:30
parent b4ad38d687
commit 1770f3cb86

View File

@ -156,7 +156,6 @@ public class RolePermissionsDaoImpl extends GenericDaoBase<RolePermissionVO, Lon
sc.setParameters("roleId", roleId); sc.setParameters("roleId", roleId);
} }
final Filter searchBySorted = new Filter(RolePermissionVO.class, "sortOrder", true, null, null); final Filter searchBySorted = new Filter(RolePermissionVO.class, "sortOrder", true, null, null);
searchBySorted.addOrderBy(RolePermissionVO.class, "id", true);
final List<RolePermissionVO> rolePermissionList = listBy(sc, searchBySorted); final List<RolePermissionVO> rolePermissionList = listBy(sc, searchBySorted);
if (rolePermissionList == null) { if (rolePermissionList == null) {
return Collections.emptyList(); return Collections.emptyList();