jpa-spec
  1. jpa-spec
  2. JPA_SPEC-20

add FetchType.LAZY/EAGER to @Lob fields and @Embeddable

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Afaik there is currently no way to specify a @Lob field as being lazy loaded.

      BLOBS and LOBS often need a big amount of memory and are expensive to fetch from the database.

      What about adding something like:

      public class MyEntity {
      
        @Lob(FetchType.LAZY)
        private String someHistoryData;
      
      }
      

      Currently one always needs to create explicit list objects which get filled with 'new' in JPQL to not trash the database.

      The same goes for @Embeddable. Though not needed that desperately it could be useful as well. (The whole Embedded would get lazily fetched when a single attribute of it is read).

        Activity

        Mark Struberg created issue -
        ldemichiel made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        ldemichiel made changes -
        Issue Type New Feature [ 2 ] Improvement [ 4 ]
        ldemichiel made changes -
        Assignee ldemichiel [ ldemichiel ]

          People

          • Assignee:
            ldemichiel
            Reporter:
            Mark Struberg
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: