Yes, you're right. Actually I get an exception when using "timestamp". Here's more data on the topic:
This is the XDoclet for the Calendar getter:
Code:
@hibernate.property column = "MODIFICATION_TS" not-null = "true" type = "timestamp"
Which is ANT-transformed to this mapping (excerpt)
Code:
<property
name="modificationTimeStamp"
type="timestamp"
update="true"
insert="true"
access="property"
column="MODIFICATION_TS"
not-null="true"
/>
And here is the ANT-generated schema (excerpt)
Code:
create table ANY (
...
MODIFICATION_TS date not null,
...
);
When running this example I get the following exception on write access
Code:
java.lang.ClassCastException
at net.sf.hibernate.type.TimestampType.deepCopyNotNull(TimestampType.java:63)
at net.sf.hibernate.type.NullableType.deepCopy(NullableType.java:96)
at net.sf.hibernate.type.TypeFactory.deepCopy(TypeFactory.java:212)
at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:935)
at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:866)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:788)
at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:747)
Anyway I'm still looking for a high resolution calendar writing/reading solution. I started without the explicit "type" spec in XDoclet, which gave me a runing example but with low resolution.
Futher help appreciated, Thanks!
Peter