Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2782

about mix use Inheritance strategy auto create table problem

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: jdbc
    • Labels:
      None

      Description

      My entities like this:

      @MappedSuperclass
      public abstract class A implements Serializable

      { @Id@Column(name = *"Uid"*, nullable = *false*, updatable = *false*, length = 36)*private* String uid = *""*; }

      @Entity
      @Inheritance(strategy = InheritanceType.JOINED)

      public abstract class B extends A

      {     //     //…… }

      @Entity
      @Inheritance(strategy = InheritanceType.SINGLE_TABLE)

      public abstract class C extends B {     //     //…… }

      @Entity
      public class C1 extends C
      {     //     //…… }

      @Entity
      public class C2 extends C {     //     //…… }

      @Entity
      public class C3 extends C

      {     //     //…… }

       

        Expected results Actual result Ecliselink result
      Table A Not create yes yes
      Table B Auto create yes yes
      Table C Auto create no yes
      Table C1 Not create yes yes
      Table C2 Not create yes yes
      Table C3 Not create yes yes

       

      The Actual result is Table C is not created, and the columns in C, C1, C2, C3 all to Table B.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gzhyun Huang yun
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: