From: Jeffrey M. M. (JIRA) <no...@at...> - 2006-06-27 18:46:45
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1859?page=comments#action_23434 ] Jeffrey M. Metcalf commented on HHH-1859: ----------------------------------------- Thanks for the comments and feedback. My apologies for opening the issue rather than going to the forum. Based on my reading of the Hibernate source code, I felt confident that I knew what I wanted. My workaround was to re-code the standard type classes with the formats I needed and put them earlier than hibernate3.jar in the class path. This is a bad solution for obvious reasons even though it works exactly as I want. I will implement extentions as you suggest. > Parameterize string format in DateType, TimeType, and TimestampType org.hibernate.type classes > ---------------------------------------------------------------------------------------------- > > Key: HHH-1859 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1859 > Project: Hibernate3 > Type: Improvement > Components: core > Versions: 3.1.3 > Environment: Hibernate 3.1.3 configured against Oracle 9.2.0.6. > Reporter: Jeffrey M. Metcalf > Priority: Minor > > > The org.hibernate.type.DateType, org.hibernate.type.TimeType, and org.hibernate.type.TimestampType use hard coded format strings and juva.util.SImpleDateFormat class to parse dates from and format dates to Strings. It would be very useful to parameterize these formats and allow the user to configure them via hibernate.cfg.xml. This becomes even more useful as the DOM4J XML serialization and deserialization proliferates in use and graduates from a development to a core Hibernate feature. > The main case for parameterizing them is that the standard date and dateTime formats defined by the W3C XSD specification are respectively "yyyy-MM-dd" and "yyyy-MM-dd'T'HH:mm:ss". Hibernate is not using these standard formats, therefore allowing the user to specify the formats at runtime provides the flexibility to allow standard XML formats (as well as others) to be used. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |