You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removing and readding a attribute within a single requests causes a DB's contraint violation.
This is caused by the session's attribute delta calculation in org.springframework.session.jdbc.JdbcOperationsSessionRepository.JdbcSession#setAttribute
Removing the attribute stores "attributeName:REMOVED" while adding later changes the information to "attributeName:ADDED". The DELETE statement then is not executed and an INSERT of that attribute is triggered on the end of the requestcycle. This leads to a constraint violation defined by CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME)
The text was updated successfully, but these errors were encountered:
mfra
changed the title
org.springframework.session.jdbc.JdbcOperationsSessionRepository.JdbcSession#setAttribute
contraint violation cause of JdbcOperationsSessionRepository.JdbcSession#setAttribute
Jul 2, 2018
Removing and readding a attribute within a single requests causes a DB's contraint violation.
This is caused by the session's attribute delta calculation in
org.springframework.session.jdbc.JdbcOperationsSessionRepository.JdbcSession#setAttribute
Removing the attribute stores "attributeName:REMOVED" while adding later changes the information to "attributeName:ADDED". The DELETE statement then is not executed and an INSERT of that attribute is triggered on the end of the requestcycle. This leads to a constraint violation defined by
CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME)
The text was updated successfully, but these errors were encountered: