It works very well.  Thanks!

On Friday, December 14, 2012 at 5:52 AM, Michael Bayer wrote:

> 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 default 
> > value 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 sqlalchemy@googlegroups.com 
> (mailto:sqlalchemy@googlegroups.com).
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com 
> (mailto:sqlalchemy+unsubscr...@googlegroups.com).
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to