From: Jacques M. (JIRA) <no...@at...> - 2006-06-06 02:10:10
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-26?page=comments#action_23263 ] Jacques Morel commented on HHH-26: ---------------------------------- Is there any resolution on this? We are developing an application that use extensively custom types and we would love to have this. This is the 3rd project that I have had this requirement popup. This time I spent the time to find this request and voted for it ;-) > Default UserType for java classes > --------------------------------- > > Key: HHH-26 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-26 > Project: Hibernate3 > Type: New Feature > Components: core > Versions: 3.0 beta 1 > Reporter: Matthew Inger > Assignee: Michael Gloegl > Priority: Minor > > > It would be nice if the user could automatically assign a particular default UserType when certain java classes are encountered. For example, many shops have special handling for empty strings, since oracle does not allow empty strings, and instead inserts null values. > We, in particular, put a single character string will a null byte (char(0)) into the db field, and when it is read, replace that with the empty string. > In order to do this, we use a UserType, which has to be specified on every nullable string field. What we'd rather do is something like this in hibernate.cfg.xml: > <default-type property-type="java.lang.String" > class="com.synygy.core.hibernate.NullableStringType" /> > Is this possible to be put into the 3.0 release? -- 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 |