Skip to content

Auto commit is always false #765

Open
@benhasselgren

Description

@benhasselgren

It appears that auto commit is false when you are executing a mapper statement in a method NOT decorated with @Transactional annotation. I verified this by sticking a breakpoint on JdbcTransactionFactory.newTransaction(DataSource ds, TransactionIsolationLevel level, boolean autoCommit) (My default data source auto commit value is set to true. I am using Hikari CP). Is this the expected behaviour? If so, it would be nice if there was some config in the MyBatisModule to allow you to set the default auto commit value for all query behaviour not wrapped within the transactional annotation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions