This commit is contained in:
Andrea Bollini
2016-09-18 15:55:04 +02:00

View File

@@ -93,7 +93,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,'/',id WHERE handle like :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);