no-more-laziness-header

No More LazyInitializationException – Use JPA 2.1 Entity Graph

Until JPA 2.0, we were restricted to use pretty static way of querying entities by declaring FetchType.LAZY (default) or FetchType.EAGER on entity’s associations – once selected mode is always used. FetchType.EAGER is a good choice if we always want to load a related entity. The issue of this approach is its performance. Another way is […]

Read more• • •