FasterXML / FasterXML/jackson-datatype-hibernate
ObjectMapper should detect if the session is already opened
- Dominant language
- Java
- Stars
- 331
- Forks
- 108
- Avg merge
- 5h 3m
- Merged PRs (30d)
- 1
Description
Please refer to [stackoverflow](http://stackoverflow.com/questions/32779557/spring-mvc-integration-test-with-hibernate-and-jackson-hibernate-mapper-illegal)
When spring integration test is annotated with @Transactional, persists a child entity and then calls a controller to return the parent entity then exception is thrown. It happens because the child entity is stored in a first session opened by @Transactional and object mapper tries to open another session to convert the parent entity to json, so the child entity appears in two sessions which lead to the exception.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.