This one has me stumped.
This happens when i commit one of my objects.
The object's class has two fields that hold java.util.Date values.
I set them like in my code like:
// Set the expiry time based on the current time + contract
duration.
cal.setTime( new Date() );
cal.add( cal.MONTH,
p.getProposalProduct().getFeeSchedule().getContractDuration() );
cs.setContractExpiryTimestamp( cal.getTime() );
cs.setCreatedTimestamp(new Date());
cs.setCreatedBy( m_remoteUserName );
cs.setModifiedBy( m_remoteUserName );
cs.setModifiedTimestamp(new Date());
// .. more setting
db.create( cs );
The mapping for the date fields is like:
<field name = "createdTimestamp" type = "date">
<sql name = "createdTimestamp" type = "timestamp" dirty = "ignore"/>
<bind-xml name = "createdTimestamp" node = "element"/>
</field>
<field name = "contractExpiryTimestamp" type = "date">
<sql name = "contractExpiryTimestamp" type = "timestamp" dirty =
"ignore"/>
<bind-xml name = "contractExpiryTimestamp" node = "element"/>
</field>
<field name = "modifiedTimestamp" type = "date">
<sql name = "modifiedTimestamp" type = "timestamp" dirty =
"ignore"/>
<bind-xml name = "modifiedTimestamp" node = "element"/>
</field>
The SQL field type is datetime not smalldatetime
I'm using inet opta2000.
Does ring a bell to anyone?
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev