Użytkownik John napisał:
> If I understand you correctly. If the value is None (or Null) you want Dabo
> not to pass the field value to the DB otherwise pass the value. You want
> this because you want the DB to set the default value in the case the field
> is not passed. And can you can not use NonUpdateFields() because you want
> Dabo to pass a value if one is supplied.
>
> My first question is how can you get this done via the dBizObj.onNew(). I
> can see where this might be valuable in the future. But I don't see how to
> do it in onNew().
>
> Normally when I setup a DB and need special handling I use triggers. Maybe
> that could be a work around in your case.
>
It can't be done, because every field, even with None/Null value is
passed to INSERT command.
To achieve this from Dabo, it would have to omit fields with Null values
from INSERT.
But, now it's the only way to use triggers.
Of course I can do that, but:
1) DEFAULT clause size is about ten characters, while trigger is ten
times more
2) triggers are handled differently in almost each database, e.g.
Firebird vs. PostgreSQL,
while DEFAULT is 99% the same, so I have much more work to do,
to provide support for multiple backends.
--
Regards
Jacek Kałucki
_______________________________________________
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/[email protected]