glassfish
  1. glassfish
  2. GLASSFISH-3083

JPA Callback annotations do not work in a @MappedSuperclass

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 9.0pe
    • Fix Version/s: 9.1pe
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      3,083
    • Status Whiteboard:
      Hide

      HIGH

      Show
      HIGH

      Description

      When using a @MappedSuperclass to define common attributes for a number of
      entities, the callback annotations do not work. Placing the following method

      @PostLoad
      private void doStuff()

      { System.out.println("Loaded"); }

      in the @MappedSuperclass does not work, but placing it in the actual entity
      class does.

      The workaround is to use @EntityListeners in the @MappedSuperclass.

        Activity

        Hide
        gfbugbridge added a comment -

        <BT6563753>

        Show
        gfbugbridge added a comment - <BT6563753>
        Hide
        pkrogh added a comment -

        Reprioritizing to P4 high.

        easy workaround - should not delay beta for this bug.

        Show
        pkrogh added a comment - Reprioritizing to P4 high. easy workaround - should not delay beta for this bug.
        Hide
        gyorke added a comment -

        This is a duplicate of an already filed bug. Although the original bug is a bit
        confusing it does report this issue.

            • This issue has been marked as a duplicate of 2314 ***
        Show
        gyorke added a comment - This is a duplicate of an already filed bug. Although the original bug is a bit confusing it does report this issue. This issue has been marked as a duplicate of 2314 ***

          People

          • Assignee:
            tware
            Reporter:
            nullop
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: