cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tore Halset <hal...@pvv.ntnu.no>
Subject Re: Represesntation of database NULL as something else than Java null pointer
Date Thu, 14 Dec 2006 13:52:18 GMT
On Dec 14, 2006, at 14:09 , √ėyvind Harboe wrote:

> Q++: Is it a good idea to use ExtendedType to represent database null
> as something else than Java null pointer?

I do not think it is a good idea in my project as I try to use "not  
null" as much as possible. The places where I allow null, there  
should be a good reason for it. It could be things like a status  
message that are not inserted yet or a price that are not calculated.  
For non-important fields like 'comment' I usually just insert "".

In a situation where you do not have control over the underlying  
data, converting those null values to something usable seem to be a  
good idea.

  - Tore.
Mime
View raw message