Tagged articles

jpql

3 articles · Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 25, 2026 · Backend Development

Four Ways to Fix Spring Boot JSON Serialization ‘no Session’ Error for Associated Entities

This article presents four practical solutions for the Spring Boot 3.5.0 “Could not write JSON: failed to lazily initialize a collection… no Session” error that occurs when serializing bidirectional one-to-many relationships, covering @JsonIgnore, JPQL fetch joins, enabling OpenEntityManagerInView, and using the Jackson Hibernate6 module, with code examples and results.

Spring Boothibernate6jackson
0 likes · 7 min read
Four Ways to Fix Spring Boot JSON Serialization ‘no Session’ Error for Associated Entities
LuTiao Programming
LuTiao Programming
Feb 25, 2026 · Backend Development

Which Entity‑to‑DTO Mapping Is Fastest? Benchmark of 3 Approaches

By benchmarking manual mapping, MapStruct, and JPQL projection across simple and relational scenarios, the article shows that JPQL is slightly faster in raw tests, but the real performance impact stems from N+1 queries, making query strategy the key factor rather than the mapping technique itself.

DTOEntity MappingMapStruct
0 likes · 8 min read
Which Entity‑to‑DTO Mapping Is Fastest? Benchmark of 3 Approaches