On Sunday 17 February 2008 6:20 pm, Ed Leafe wrote:
> On Feb 17, 2008, at 1:33 PM, Adrian Klaver wrote:
> >>    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.
> >
> > I would greatly appreciate it. I know wars have been fought over
> > NULL, but it
> > does serve a purpose.
>
>       OK, I've done some tests, and it doesn't look good. It seems that if
> I set those values to None, when the record is saved it creates SQL
> like:
>
> insert into mytable (foo, bar, baz) values (None, None, None)
>
> ...and if those fields do not accept null values, it will return an
> error. The only way to get the database defaults is to not include
> those fields in the insert statement, but that will take a much more
> extensive re-working of the code.
>
> -- Ed Leafe
>

I should have thought of that. Well I can set defaults in the bizobj.
-- 
Adrian Klaver
[EMAIL PROTECTED]


_______________________________________________
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