Open
Description
Expected Behavior
Quick Note about JPA Caching Interactions with the Authentication Chain
Current Behavior
Nothing currently noting the interaction with the EntityManager
when using defaults.
Context (This is mostly Conjecture, based on Stack Traces and a lot of break point, but the Current Behavior is currect)
As the Spring Security Filter Chain is typically one of the first filters, the OpenEntityManagerInViewFilter
/OpenEntityInViewInterceptor
Filters are not called yet. This means if your UserDetailsService
is JPA based, any DB Entity will not be associated to the JPA Persistence Context for the rest of the request. Although this behavior is preferred, it would be good to document that the Entity is unmanaged when using defaults.