[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2238) SQLQuery executeUpdate doesn't respect Query.setFlushMode()
Tim Downey (JIRA)
noreply at atlassian.com
Tue Nov 14 10:25:04 EST 2006
SQLQuery executeUpdate doesn't respect Query.setFlushMode()
-----------------------------------------------------------
Key: HHH-2238
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2238
Project: Hibernate3
Type: Bug
Versions: 3.2.0.cr5
Environment: Windows/Oracle 10g
Reporter: Tim Downey
Priority: Minor
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();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list