Issue Details (XML | Word | Printable)

Key: HHH-2238
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Steve Ebersole
Reporter: Tim Downey
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Hibernate Core

SQLQuery executeUpdate doesn't respect Query.setFlushMode()

Created: 14/Nov/06 09:23 AM   Updated: 21/Nov/06 06:11 PM
Component/s: None
Affects Version/s: 3.2.0.cr5
Fix Version/s: 3.2.2

Time Tracking:
Not Specified

Environment: Windows/Oracle 10g


 Description  « Hide
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();
}
}


 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Steve Ebersole added a comment - 21/Nov/06 06:11 PM
trunk / 3.2