[sqlalchemy] Re: Connecting to MySQL

2008-07-11 Thread Heston James - Cold Beans
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

[sqlalchemy] Re: Connecting to MySQL

2008-07-11 Thread Heston James - Cold Beans
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

[sqlalchemy] Re: Connecting to MySQL

2008-07-11 Thread jason kirtland
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

[sqlalchemy] Re: Connecting to MySQL

2008-07-10 Thread Lukasz Szybalski
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

[sqlalchemy] Re: Connecting to MySQL

2008-07-10 Thread Rick Morrison
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

[sqlalchemy] Re: Connecting to MySQL

2008-07-10 Thread Heston James - Cold Beans
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

[sqlalchemy] Re: Connecting to MySQL

2008-07-10 Thread Rick Morrison
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

[sqlalchemy] Re: Connecting to MySQL

2008-07-10 Thread jason kirtland
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

[sqlalchemy] Re: Connecting to MySQL

2008-07-10 Thread Lukasz Szybalski
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: