Author: bdaw
Date: 2011-10-06 09:10:47 -0400 (Thu, 06 Oct 2011)
New Revision: 1289
Modified:
idm/trunk/picketlink-idm-hibernate/src/main/java/org/picketlink/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
Log:
- lack of alias in criteria that somehow passed...
Modified:
idm/trunk/picketlink-idm-hibernate/src/main/java/org/picketlink/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
===================================================================
---
idm/trunk/picketlink-idm-hibernate/src/main/java/org/picketlink/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2011-10-06
12:24:50 UTC (rev 1288)
+++
idm/trunk/picketlink-idm-hibernate/src/main/java/org/picketlink/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2011-10-06
13:10:47 UTC (rev 1289)
@@ -1443,24 +1443,26 @@
{
if (parent)
{
+ criteria.createAlias("toIdentityObject", "io");
if (searchCriteria.isAscending())
{
- criteria.addOrder(Order.asc("toIdentityObject.name"));
+ criteria.addOrder(Order.asc("io.name"));
}
else
{
- criteria.addOrder(Order.desc("toIdentityObject.name"));
+ criteria.addOrder(Order.desc("io.name"));
}
}
else
{
+ criteria.createAlias("fromIdentityObject", "io");
if (searchCriteria.isAscending())
{
- criteria.addOrder(Order.asc("fromIdentityObject.name"));
+ criteria.addOrder(Order.asc("io.name"));
}
else
{
- criteria.addOrder(Order.desc("fromIdentityObject.name"));
+ criteria.addOrder(Order.desc("io.name"));
}
}
}
Show replies by date