Skip to content

How to skip not loaded Lazy fields? #723

Open

Description

@kfgisbis

I have an entity that hibernate loads depending on a graph.
Sometimes I need one field, sometimes another.
An entity has some nesting, even a collection within a collection.
I need not to transfer fields to dto that are not initialized.

I see three solutions, but I don't know how to implement them:

  1. Determine that this is not a loaded object and skip it.
  2. Send to the mapper a list of field names to be skipped.
  3. Catch an error and assign null.

At the first level, it is clear how to skip fields, but at the second or third level, and even in an object that is in the collection...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions