fREW Schmidt wrote:
    Why do you want them to be NULL? As a general rule, unless you have a
    specific requirement for NULL they're best avoided (see discussion
    passim). Even when you think you have all the bases covered there's
    some weird case where they turn out to be a PITA later...

How is that the case? It seems like an undefined value makes perfect sense to allow users to specify.

Sure it makes sense for users to specify that a value is undefined. However, using a SQL NULL isn't always the best way to record this fact. For one thing, there could be a variety of reasons why a value is undefined (for example, "missing" versus "not applicable" versus more specific reasons) but a SQL NULL wouldn't let you distinguish between them. A better solution is to avoid the use of SQL NULL and instead represent undefined in some other way, such as by having an undefined-because meta-data field. -- Darren Duncan

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to