bug in DAL with boolean field type

21 views
Skip to first unread message

Jose C

unread,
Feb 23, 2009, 4:47:58 PM2/23/09
to web2py Web Framework
Hi Massimo,

Setting a field to Boolean type in the model actually creates a CHAR
(1) field in the backend database (instead of BOOLEAN). This occurs
in sqlite as well as postgresql - ver:745 of source.

JC

mdipierro

unread,
Feb 23, 2009, 5:32:31 PM2/23/09
to web2py Web Framework
That's what web2py does. T or F as opposed to 1 and 0. You can argue
both ways but not all database backend support boolean and when they
do they may have odd behaviour (like NULL value not allowed). This a
feature not a bug. ;-)

Massimo

Jose C

unread,
Feb 23, 2009, 5:42:49 PM2/23/09
to web2py Web Framework
Ahh I see. My apologies for the false bug report.

JC
Reply all
Reply to author
Forward
0 new messages