Closed orekyuu closed 2 months ago
Thanks for your feedback.
Does #1126 meet your needs? By the way, could you please tell me why you want this feature?
Yes, #1126 is exactly what I am looking for. For example, when issuing only select queries such as an API that returns user information, I believe it is unnecessary to use transactions.
Description Currently, when using LocalTransactionDataSource, queries can only be executed within a transaction. If a query is executed outside of a transaction, it throws a LocalTransactionNotYetBegunException. https://github.com/domaframework/doma/blob/master/doma-core/src/main/java/org/seasar/doma/jdbc/tx/LocalTransactionDataSource.java#L92
Is there a way to avoid using transactions except where necessary?
Implementation ideas I would like to have the option to either throw an exception or delegate to the dataSource when outside of a transaction.