Github user albertostratio commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/31#discussion_r34438477
  
    --- Diff: 
jdbc/src/main/java/org/apache/metamodel/jdbc/JdbcUpdateCallback.java ---
    @@ -63,10 +63,12 @@ public void executePreparedStatement(PreparedStatement 
preparedStatement, boolea
         protected final Connection getConnection() {
             if (_connection == null) {
                 _connection = getDataContext().getConnection();
    -            try {
    -                _connection.setAutoCommit(false);
    -            } catch (SQLException e) {
    -                throw JdbcUtils.wrapException(e, "disable auto-commit");
    +            if (_dataContext.getQueryRewriter().isTransactional()) {
    +                try {
    +                    _connection.setAutoCommit(false);
    +                } catch (SQLException e) {
    --- End diff --
    
    With this change we are now setting the autocommit to false only when the 
isTransactional condition is true, is this what we want?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to