Joined: Thu Mar 04, 2004 11:51 am Posts: 1 Location: Trondheim, Norway
|
INFO: Hibernate 2.1.2
PostgreSQL: 7.3.4
Hi,
I'm having trouble with a db column that is of type float8 that can contain null.
The problem is described in the faq *) and happens when running a Criteria.list() request.
The question is; how do I use a Hibernate custom type to do as described in the FAQ ? I've not found any .bhm.xml and/or .java examples
that illustrates this.
*)
From the Hibernate Users FAQ - Common Problems
Hibernate throws a PropertyAccessException or NullPointerException when I load or query an object!
If your object has a primitive-type property mapped to a nullable database column then you will need to use a Hibernate custom type to assign a sensible default (primitive) value for the case of a null column value. A better solution is usually to use a wrapper type for the Java property.
With regards,
Ken A. Rederg
|
|