Column('created', DateTime, default=func.now()),
Column('updated', DateTime, onupdate=func.now()))
You can set both default= and onupdate= on the same Column if you want
'updated' to be non-NULL on insert.
That sounds like a nice clean way of doing this Jason, I'm more than
PROTECTED] On
Behalf Of Rick Morrison
Sent: 10 July 2008 17:37
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: Connecting to MySQL
That's exactly what the problem was :-) Is there any reason I should avoid
using 0.5? I'm running python 2.4 at the moment, are they compatible?
0.5 is still
Lukasz Szybalski wrote:
On Thu, Jul 10, 2008 at 11:59 AM, jason kirtland [EMAIL PROTECTED] wrote:
Lukasz Szybalski wrote:
On Thu, Jul 10, 2008 at 11:26 AM, Heston James - Cold Beans
[EMAIL PROTECTED] wrote:
Session.add is a version 0.5 method, you're maybe running 0.4.6?
In the 0.4.x
On Thu, Jul 10, 2008 at 8:20 AM, Heston James
[EMAIL PROTECTED] wrote:
Good afternoon guys,
I'm brand new to SQLAlchemy as of about 2 minutes ago, I have a couple
of starter questions that I wanted to run past you, with any luck
they'll be simple for you to answer.
After looking through
Session.add is a version 0.5 method, you're maybe running 0.4.6?
In the 0.4.x series, it's going to be:
Session.save() for objects that are to be newly added to the session
Session.update() for objects that are already in the session, or
Session.save_or_update() to have the library figure it out
Session.add is a version 0.5 method, you're maybe running 0.4.6?
In the 0.4.x series, it's going to be:
Session.save() for objects that are to be newly added to the session
Session.update() for objects that are already in the session, or
Session.save_or_update() to have the library figure
That's exactly what the problem was :-) Is there any reason I should avoid
using 0.5? I'm running python 2.4 at the moment, are they compatible?
0.5 is still in beta, and I don't have much experience with it myself, but
if were just starting out, I would probably be using that, otherwise
Lukasz Szybalski wrote:
On Thu, Jul 10, 2008 at 11:26 AM, Heston James - Cold Beans
[EMAIL PROTECTED] wrote:
Session.add is a version 0.5 method, you're maybe running 0.4.6?
In the 0.4.x series, it's going to be:
Session.save() for objects that are to be newly added to the session
On Thu, Jul 10, 2008 at 11:59 AM, jason kirtland [EMAIL PROTECTED] wrote:
Lukasz Szybalski wrote:
On Thu, Jul 10, 2008 at 11:26 AM, Heston James - Cold Beans
[EMAIL PROTECTED] wrote:
Session.add is a version 0.5 method, you're maybe running 0.4.6?
In the 0.4.x series, it's going to be: