mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
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:
@@ -83,7 +83,7 @@ public class HandleDAOImpl extends AbstractHibernateDAO<Handle> implements Handl
|
|||||||
@Override
|
@Override
|
||||||
public int updateHandlesWithNewPrefix(Context context, String newPrefix, String oldPrefix) throws SQLException
|
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 query = createQuery(context, hql);
|
||||||
query.setString("newPrefix", newPrefix);
|
query.setString("newPrefix", newPrefix);
|
||||||
query.setString("oldPrefix", oldPrefix);
|
query.setString("oldPrefix", oldPrefix);
|
||||||
|
Reference in New Issue
Block a user