@Temporal annotation overrides the @Column annotation when using in conjunction
with @ElementCollection
-------------------------------------------------------------------------------------------------------
Key: OPENJPA-1431
URL: https://issues.apache.org/jira/browse/OPENJPA-1431
Project: OpenJPA
Issue Type: Bug
Components: jpa
Affects Versions: 2.0.0
Reporter: Fay Wang
Assignee: Fay Wang
Priority: Minor
Fix For: 2.0.0
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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.