[orm-devel] default column value
diedrich at tux4web.de
Wed Mar 31 11:16:13 CEST 2004
>I was wondering if there was a way to set a default value for a column. I
>checked in th column class and didn't see any mention of it, but I wanted to
>make sure I wasn't missing something. Would be handy for things like
>creation times in datetime columns. Maybe I'll look into adding that after
>some of these documention updates. Thanks!
just use your backend's DEFAULT functionality. If you do not set a
dbobject's attribute explicitly the corresponding column will not be
mentioned in the INSERT statement generated by orm.
Diedrich Vorberg <diedrich at tux4web.de> .---. / \
http://tux4web.de Tel: 02302 425269 / \ ((__-^^-,-^^-__))
\.O-O./ `-_---' `---_-'
"Unix is simple, but it takes a genius /`\_/`\ `--|o` 'o|--'
to understand the simplicity." // _ \\ \ ` /
- Dennis Ritchie | \ )|_ ): :(
/`\_`> <_/ \ :o_o:
Associate Member of the FSF #1245 \__/'---'\__/ "-"
More information about the orm-devel