[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Temporal annotation acts differently than mapping?
|
It appears that the temporal annotation provides different results than the
temporal mapping.
I'm using EclipseLink 1.1 against Oracle 10g.
I have a table with a column defined as DATE
The corresponding attribute in my entity class is defined as a
java.util.Date
When I map this attribute to the column via the @Temporal(TemporalType.DATE)
annotation,
I expect to get a date with no time element and I do.
When I map this attribute to the column via the
@Temporal(TemporalType.TIMESTAMP) annotation,
I expect to get a date with the time element set and I do.
However, when I map this entity to the table via orm.xml mapping instead of
annotations
and associate the <temporal>TIMESTAMP</temporal> with the date attribute,
the
date value populated by EclipseLink does not contain the time element as
expected.
So it looks like the @Temporal(TemporalType.TIMESTAMP) is acting correctly
but the <temporal>TIMESTAMP</temporal> does not act correctly.
What's up?
--
View this message in context: http://www.nabble.com/Temporal-annotation-acts-differently-than-mapping--tp23489987p23489987.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.