aaberg / sql2o

sql2o is a small library, which makes it easy to convert the result of your sql-statements into objects. No resultset hacking required. Kind of like an orm, but without the sql-generation capabilities. Supports named parameters.
http://sql2o.org
MIT License
1.15k stars 229 forks source link

sql2o and spring transaction integration question #313

Open colesico opened 5 years ago

colesico commented 5 years ago

https://github.com/aaberg/sql2o/wiki/Integration-with-Spring-Framework

Not quite clear how does the sql2o actualy gets the jdbc connection that is binded to the active transaction?

As far as I know, in order to get a jdbc connection binded to the active spring transaction, DataSourceUtils.getConnection() shoud be used ( instead of directly from data sourcre) or data source wraped to TransactionAwareDataSourceProxy

Thx!

dirkluijk commented 3 years ago

It looks like @Transactional is not working either.