mirror of
https://github.com/apache/openjpa.git
synced 2025-03-01 05:59:14 +00:00
OPENJPA-389 et.commit() not issuing database commit for Native queries involving updates.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@581088 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5a48e90100
commit
fab1a92046
@ -215,6 +215,9 @@ public class SQLStoreQuery
|
||||
paramList = Collections.EMPTY_LIST;
|
||||
|
||||
SQLBuffer buf = new SQLBuffer(dict).append(sql);
|
||||
|
||||
// we need to make sure we have an active store connection
|
||||
store.getContext().beginStore();
|
||||
Connection conn = store.getConnection();
|
||||
JDBCFetchConfiguration fetch = (JDBCFetchConfiguration)
|
||||
q.getContext().getFetchConfiguration();
|
||||
@ -241,6 +244,8 @@ public class SQLStoreQuery
|
||||
try { stmnt.close(); } catch (SQLException se2) {}
|
||||
try { conn.close(); } catch (SQLException se2) {}
|
||||
throw SQLExceptions.getStore(se, dict);
|
||||
} finally {
|
||||
try { conn.close(); } catch (SQLException se) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user