On Feb 17, 2008, at 12:57 PM, Adrian Klaver wrote:

> It displays '<None>' when there is a NULL in the field. My problem  
> comes when I
> create a new record. If I don't enter a value in a field the value  
> passed to the INSERT
> statement is '' for a string column, 0 for a number column and False  
> for a boolean.
> This causes problems with the DEFAULT values I have set up in the  
> Postgres database.
> Instead of the column receiving a NULL value and filling in the  
> correct default it receives
> an invalid value. I am trying to figure out a way to undo this  
> editorializing without having
> to specify DEFAULTS for the fields in DABO as they already exist in  
> the database.

        The only way to do that currently is to specify None as the default  
value in the bizobj for those fields. Then when the record is inserted  
into thedatabase, most backends will interpret a null as a request for  
the default value.

        What if I were to add code that said that if biz.DefaultValues = None  
(instead of an empty dict), all the non-PK values would be assigned  
values of None? I haven't tested it or anything; just throwing out  
ideas.

-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to