
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Windows/Oracle 10g
|
|
|
Setting the flush mode manual on a SQLQuery is not respected when executeUpdate() is called. Under a standard Query, a call to before() is made prior to running executeUpdate(). The call to before() handles the query specific flush mode.
This same behavior seems necessary for SQLQuery.
Here is a fix for SQLQuery#executeUpdate
public int executeUpdate() throws HibernateException {
Map namedParams = getNamedParams();
before();
try {
return getSession().executeNativeUpdate(generateQuerySpecification( namedParams ), getQueryParameters( namedParams ));
finally {
after();
}
}
|
|
Description
|
Setting the flush mode manual on a SQLQuery is not respected when executeUpdate() is called. Under a standard Query, a call to before() is made prior to running executeUpdate(). The call to before() handles the query specific flush mode.
This same behavior seems necessary for SQLQuery.
Here is a fix for SQLQuery#executeUpdate
public int executeUpdate() throws HibernateException {
Map namedParams = getNamedParams();
before();
try {
return getSession().executeNativeUpdate(generateQuerySpecification( namedParams ), getQueryParameters( namedParams ));
finally {
after();
}
}
|
Show » |
|