Skip to content

Demonstrate solution for lazy-loading #33

Open
@glassfishrobot

Description

@glassfishrobot

In the application some JPA relations are one-to-many and by default lazy loaded. When fetching the aggregate-root through the repository the returned root object will be detatched. Eclipselink handles this for read operations but Hibernate would throw a LazyInitializationException.

A traditional solution would be to add methods to a DAO such as loadCargoWithLoadedLegs();
With a lot of lazy collections and many combinations this would quickly be a bloated interface.

As a developer I would like to fetch the root, access and make changes to any object in graph, then store the root and have all changes persisted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogItems yet to be prioritized in the longer term roadmap.enhancementNew feature or requestvery-low-priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions