The following simple patch appears to solve the issue. But since I have limited insight into the reasoning behind the v5 rework I am not certain it is an acceptable way to go....
Index: portal-impl/src/com/liferay/portal/dao/orm/hibernate/QueryImpl.java
===================================================================
--- portal-impl/src/com/liferay/portal/dao/orm/hibernate/QueryImpl.java (revision 18471)
+++ portal-impl/src/com/liferay/portal/dao/orm/hibernate/QueryImpl.java (working copy)
@@ -147,6 +147,15 @@
}
}
+ public int executeUpdate() throws ORMException {
+ try {
+ return _query.executeUpdate();
+ }
+ catch (Exception e) {
+ throw ExceptionTranslator.translate(e);
+ }
+ }
+
private org.hibernate.Query _query;
}
\ No newline at end of file
Index: portal-impl/src/com/liferay/portal/dao/orm/hibernate/SQLQueryImpl.java
===================================================================
--- portal-impl/src/com/liferay/portal/dao/orm/hibernate/SQLQueryImpl.java (revision 18471)
+++ portal-impl/src/com/liferay/portal/dao/orm/hibernate/SQLQueryImpl.java (working copy)
@@ -161,6 +161,15 @@
}
}
- private org.hibernate.SQLQuery _sqlQuery;
+ public int executeUpdate() throws ORMException {
+ try {
+ return _sqlQuery.executeUpdate();
+ }
+ catch (Exception e) {
+ throw ExceptionTranslator.translate(e);
+ }
+ }
-}
\ No newline at end of file
+ private org.hibernate.SQLQuery _sqlQuery;
+
+}
Index: portal-kernel/src/com/liferay/portal/kernel/dao/orm/Query.java
===================================================================
--- portal-kernel/src/com/liferay/portal/kernel/dao/orm/Query.java (revision 18471)
+++ portal-kernel/src/com/liferay/portal/kernel/dao/orm/Query.java (working copy)
@@ -67,4 +67,6 @@
public Object uniqueResult() throws ORMException;
-}
\ No newline at end of file
+ public int executeUpdate() throws ORMException;
+
+}
Please sign in to flag this as inappropriate.