mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 22:13:08 +00:00
DS-3280 Fix HQL Syntax at HandleDAOImpl
Solved the error when executing ./dspace update-handle-prefix in commandline. There were some errors in the HQL syntax at HandleDAOImpl class when updating the HANDLE table.
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,'/',id WHERE handle like :oldPrefix%";
|
String hql = "UPDATE Handle set handle = concat(:newPrefix,'/',handle_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