Track tasks and feature requests
Join 40 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterprisesJdbcTemplate - Add support for multitenancy [SPR-17342] #21876
Comments
This comment has been minimized.
This comment has been minimized.
any update on this one? One thing to mention, JDBC connection has |
This comment has been minimized.
This comment has been minimized.
So this is just ridiculous. Basically JdbcTemplate is hard coded to be single tenant. Because of this we do not even use it, but there is a catch ! Spring team uses it so we have to write ton of our own implementations already provided by spring to not use JdbcTemplate. geez |
robert-niestroj opened SPR-17342 and commented
Please add support for multitenancy in JdbcTemplate.
Scenario: i have an app which uses JPA for CRUD, but for reporting uses native queries executed via JdbcTemplate. Hibernate in our app is working in multitenancy mode with the strategy per schema on MySQL. I tried several things but could not implement similar multitenancy in JdbcTemplate.
Basiclly i do connection.createStatement("USE " + tenantSchema ); in hibernates multitenancyConnectionProvider.
I would like to do something similar in JdbcTemplate.
Reference URL: https://stackoverflow.com/questions/52541380/spring-jdbctemplate-how-to-prepend-every-query