[Zope] Gadfly table change

Geir Bækholt Geir Bækholt <geirh@funcom.com>
Fri, 21 Jun 2002 10:00:09 +0200

on or about, Friday, June 21, 2002, we have reason to believe that
douwe@oberon.nl wrote something along the lines of :
don> Hi,

don> I have a table in Gadly that needed to extra fields. I couldn't find a=
don> 'ALTER TABLE' statement and since the current data wasn't very importa=
nt, I
don> dropped the table and recreated it with the extra fields. However, this
don> didn't work as planned, ever since I get an error when I try to insert=
don> with the new fields set:

don> Error, exceptions.NameError: ['FIELD1', 'FIELD2', 'FIELD3', 'FIELD4']:=
don> set in insert on TABLE

don> where TABLE is my table and FIELD1..4 are the new fields.

don> I checked the source code where the exception is thrown and it seems t=
don> some part of Gadfly is still working with the old definition it says #=
## for
don> now all attributes must be in colset.

don> Any ideas=3F

The reason you cannot alter tables in Gadfly is that it does not
support NULLs.. (one of it biggest shortcomings, IMHO)

Seems to me you are using an old insert method that
does not set those new columns to anything, and as Gadlfy cannot (as other
RDBMSes would) just insert NULLs there , it chokes and gives you an
error instead..

Check the method in from which you try to do the insert, and make sure
you give a value for each of the new columns..


Geir B=E6kholt                      web-developer
geirh@funcom.com             funcom oslo | webdev-team