]
Steve Ebersole closed HHH-26.
-----------------------------
Assignee: (was: Michael Gloegl)
Resolution: Duplicate
This issue has been addressed by HHH-5138 since 3.6 You can define Types to use
throughout a SessionFactory for a given java type.
Default UserType for java classes
---------------------------------
Key: HHH-26
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-26
Project: Hibernate Core
Issue Type: New Feature
Components: core
Affects Versions: 3.0 beta 1
Reporter: Matthew Inger
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: