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

Indices specified using javax.persistence.Index annotation are not being created

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.0
    • Component/s: jdbc
    • Labels:
      None

      Description

      Indices specified using javax.persistence.Index annotation are not being created

      i saw a similar example but was hoping the index could be automatically
      created. some indexes are automatically created but seeingly not others.
      i tried the annotations as in the example and the index is never
      created. here is what i have added to my class
      @Entity
      @Table(name = "billentry", indexes =

      { @Index(name = "I_BLLNTRY_SECTION", columnList = "BILLSECTION_ID", unique = false), @Index(name = "I_BLLNTRY_BILLTEMPLATEENTRY", columnList = "btentryid", unique = false) }

      )
      public class BillEntry implements Serializable {
      private static final long serialVersionUID = 1L;

      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;

      @Version
      private Long version;

      @ManyToOne
      private BillSection billSection;

      @ManyToOne
      @Column(name = "btentryid")
      private BillTemplateEntry billTemplateEntry;

      Mail thread: https://markmail.org/message/c4tom6hwjt7temur

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                solomax Maxim Solodovnik
                Reporter:
                solomax Maxim Solodovnik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m