tricky, perhaps try setting the column to the expression 
"sqlalchemy.sql.null()" for now.    A None does indicate "fire the default".

On Thursday, December 13, 2012 12:41:38 PM UTC-5, Hong Minhee wrote:
>
> Hi,
>
> I have a model class which contains a nullable DateTime column, and its 
> default value is now().  Its value is None immediately after it’s 
> instantiated with Model(col=None), but it becomes filled to the current 
> time after the session gets flushed.  (Note: I’m using 
> sqlalchemy.ext.declarative with its default constructor.)  Does defaultvalue 
> mean just alternative value to 
> None?
>
> I want to make the column to be set to the current time by default, but 
> still possible to be explicitly set to None if needed.  Is there any way 
> to achieve this?
>
>
> Thanks,
> Hong Minhee
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/LO99H_UrY1wJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to