Menu

#2 Hibernate types

open
nobody
None
5
2004-02-10
2004-02-10
No

For handling binary data and text I found the following sensible.

Index: HibernateClassProperty.java

retrieving revision 1.6
diff -u -r1.6 HibernateClassProperty.java
--- HibernateClassProperty.java 8 Feb 2004 19:52:41 -0000 1.6
+++ HibernateClassProperty.java 10 Feb 2004 19:14:29 -0000
@@ -102,6 +102,8 @@
typeMap.put("yes_no", "boolean");
typeMap.put("true_false", "boolean");
typeMap.put("byte", "byte");
+ typeMap.put("binary", "byte[]");
+
typeMap.put("integer", Integer.class.getName());
typeMap.put("currency", "java.util.Currency");
typeMap.put("big_decimal", BigDecimal.class.getName());
@@ -119,8 +121,8 @@
typeMap.put("object", Object.class.getName());
typeMap.put("blob", Blob.class.getName());
typeMap.put("clob", Clob.class.getName());
- typeMap.put("text", Clob.class.getName());
-
+ typeMap.put("text", String.class.getName());
+
primitiveMap.put("int", Integer.class.getName());
primitiveMap.put("float", Float.class.getName());
primitiveMap.put("long", Long.class.getName());

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.