[jboss-user] [jBPM] New message: "Saving a Date or Timestamp in database"
Dominic Umbeer
do-not-reply at jboss.com
Mon Feb 22 14:50:03 EST 2010
User development,
A new message was posted in the thread "Saving a Date or Timestamp in database":
http://community.jboss.org/message/527700#527700
Author : Dominic Umbeer
Profile : http://community.jboss.org/people/homes
Message:
--------------------------------------------------------------
In default case a java.util.Date variable will stored as String in the jbpm4_variable table! See following line of the jbpm.variable.types.xml (included in jbpm.jar) file:
<type name="date" class="java.util.Date" converter="org.jbpm.pvm.internal.type.converter.DateToStringConverter" variable-class="org.jbpm.pvm.internal.type.variable.StringVariable" />
The jbpm4_variable table has a DATE_VALUE column to store timestamps, so Date's too. Is there any reason why Date's are converted to String's and not stored to DATE_VALUE column directly?
When I add something like the following to jbpm.variable.types.xml and comment out the previous line then the Date's will stored to the DATE_VALUE column.
<type name="date" class="java.util.Date" variable-class="org.jbpm.pvm.internal.type.variable.DateVariable" />
Best regards
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/527700#527700
More information about the jboss-user
mailing list