OpenJPA
  1. OpenJPA
  2. OPENJPA-1431

@Temporal annotation overrides the @Column annotation when using in conjunction with @ElementCollection

    Details

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

      Description

      1) With these annotations:
      @CollectionTable(name = "collectionTemporalOrderColumnTable", joinColumns = @JoinColumn(name = "parent_id"))
      @ElementCollection(fetch = FetchType.EAGER)
      @Temporal(TemporalType.DATE)
      @Column(name = "value")
      @OrderColumn(name = "valueOrderColumn")
      //@Temporal(TemporalType.DATE)
      private Collection<Date> collectionDate;

      The collectionTemporalOrderColumnTable is created with the following columns: PARENT_ID, VALUE, VALUEORDERCOLUMN

      (2) With these annotations:
      @CollectionTable(name = "collectionTemporalOrderColumnTable", joinColumns = @JoinColumn(name = "parent_id"))
      @ElementCollection(fetch = FetchType.EAGER)
      //@Temporal(TemporalType.DATE)
      @Column(name = "value")
      @OrderColumn(name = "valueOrderColumn")
      @Temporal(TemporalType.DATE)
      private Collection<Date> collectionDate;

      The collectionTemporalOrderColumnTable is created with the following columns: PARENT_ID, ELEMENT, VALUEORDERCOLUMN

        Activity

        Donald Woods made changes -
        Fix Version/s 2.0.0-beta [ 12314149 ]
        Fix Version/s 2.0.0-beta2 [ 12314802 ]
        Affects Version/s 2.0.0-beta [ 12314149 ]
        Donald Woods made changes -
        Fix Version/s 2.0.0-beta2 [ 12314802 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Affects Version/s 2.0.0-beta [ 12314149 ]
        Affects Version/s 2.0.0-M3 [ 12314148 ]
        Affects Version/s 2.0.0 [ 12314019 ]
        Fay Wang made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Fay Wang made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Fay Wang created issue -

          People

          • Assignee:
            Fay Wang
            Reporter:
            Fay Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development