Skip to content

Require transactions by default for all Hibernate ORM session use #51244

@yrodiere

Description

@yrodiere

Description

I.e. have quarkus.hibernate-orm.request-scoped.enabled default to false instead of the current true.

Motivation:

  • Allowing transaction-less sessions by default is not safe: running two queries in the same session outside of a transaction will give you inconsistent data.
  • Allowing transaction-less sessions by default is not efficient: JDBC batching will not (in general) work outside of transactions, causing performance problems, especially with things like StatelessSession#insertMultiple/StatelessSession#updateMultiple.

Implementation ideas

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions