OpenJPA
  1. OpenJPA
  2. OPENJPA-1046

Unique Constraint on MappedSupperClass causes NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-beta
    • Component/s: jpa
    • Labels:
      None

      Description

      Defining UniqueConstraint on MappedSuperClass fails with NPE [1]

      @MappedSuperclass
      @Table(uniqueConstraints={@UniqueConstraint(columnNames=

      {"ATTR_NAME", "OWNER"}

      )})
      public abstract class Attribute<T> {

      While it is debatable a @Table annotation is appropriate for @MappedSuperClass, the situation must be detected and warned more gracefully than a NPE.

      Also investigate whether UniqueConstraint on a MappedSuperClass should be supported.

      [1] http://n2.nabble.com/UniqueConstraint-in-a-MappedSuperclass-not-working-tc2633410.html

        Activity

        Hide
        Pinaki Poddar added a comment -

        Commits are wrongly tagged as OPENJPA-1047

        Show
        Pinaki Poddar added a comment - Commits are wrongly tagged as OPENJPA-1047

          People

          • Assignee:
            Pinaki Poddar
            Reporter:
            Pinaki Poddar
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development