DS-3280 Replace 'handle_id' by 'id' in HQL query

The HQL query was fixed to use the 'id' of the Hibernate entity
instead of the 'handle_id' DB column.
This commit is contained in:
FacundoAdorno
2016-09-15 17:27:18 -03:00
parent d09e8036a9
commit 951a9ed18f

View File

@@ -83,7 +83,7 @@ public class HandleDAOImpl extends AbstractHibernateDAO<Handle> implements Handl
@Override
public int updateHandlesWithNewPrefix(Context context, String newPrefix, String oldPrefix) throws SQLException
{
String hql = "UPDATE Handle set handle = concat(:newPrefix,'/',handle_id) WHERE handle like concat(:oldPrefix,'%')";
String hql = "UPDATE Handle set handle = concat(:newPrefix,'/',id) WHERE handle like concat(:oldPrefix,'%')";
Query query = createQuery(context, hql);
query.setString("newPrefix", newPrefix);
query.setString("oldPrefix", oldPrefix);