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

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0-M3
    • 2.0.0-beta
    • jpa
    • 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

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            faywang Fay Wang
            faywang Fay Wang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment