-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expose a new method JdbcOperationsSessionRepository#setSessionAttributeTableName() #1347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
After doing some tests, this appears to be an issue specific to MySQL/MariaDB. All other databases we're testing against do not exhibit such case insensitivity. With that in mind I'm closing this as declined, especially since there are other options do work around this:
|
Can we reconsider this? I'm having the same problem: my table names are all lower case, I set the property spring.session.jdbc.table-name = spring_session, but I get queries to the table spring_session_ATTRIBUTES. I'm using Google Cloud MySQL 8.0 as a service, which is case sensitive and does not support the flag lower_case_table_names (https://cloud.google.com/sql/docs/mysql/flags#list-flags-mysql) to make it insensitive. So the queries fail. Configuring custom SQL on JdbcIndexedSessionRepository just for this seems overengineering to me. Thank you. |
I think Spring Session could indeed be a bit friendlier here as developers often times have little to no control over the database they need to use, while also having to adhere so some rules. I'll try to give this another round of consideration. |
I've got problem with defining custom names for
SPRING_SESSION
&SPRING_SESSION_ATTRIBUTES
tables.I can override just table name for
SPRING_SESSION
byorg.springframework.session.jdbc.JdbcOperationsSessionRepository#setTableName
BUT for I would like to have
org.springframework.session.jdbc.JdbcOperationsSessionRepository#setSessionAttributeTableName
because I would like to define tables with the same naming convention as it already exists in my schema (all tables in lower case) but will get:
session
- akaSPRING_SESSION
session_ATTRIBUTES
- akaSPRING_SESSION_ATTRIBUTES
which look strange 😞
The text was updated successfully, but these errors were encountered: