Re: [SQLObject] Having a modified column filled in automagically...

2008-08-27 Thread Buck Golemon
In mySQL the first two TIMESTAMP-type columns have special meanings like this (one is creation, other is modification, not sure which). http://dev.mysql.com/doc/refman/5.0/en/timestamp.html Andres Freund wrote: Hi, On Sunday 17 August 2008, Sam's Lists wrote in "[SQLObject] Having

Re: [SQLObject] Having a modified column filled in automagically...

2008-08-26 Thread Sam's Lists
t rid of the ForeignKey in my model (but kept it in the database). Instead of a ForeignKey I used a simple IntCol---and success. Thanks! On Tue, Aug 26, 2008 at 3:46 AM, Andres Freund <[EMAIL PROTECTED]> wrote: > Hi, > > On Sunday 17 August 2008, Sam's Lists wrote in "

Re: [SQLObject] Having a modified column filled in automagically...

2008-08-26 Thread Andres Freund
Hi, On Sunday 17 August 2008, Sam's Lists wrote in "[SQLObject] Having a modified column filled in automagically...": > I'd like to be able to create a timestamp column called "mtime" in some of > my columns. This would hold a timestamp of when the ro

Re: [SQLObject] Having a modified column filled in automagically...

2008-08-26 Thread Sam's Lists
A belated thank you to Oleg and Christopher...but it seems like neither of these suggestions really are universal enough. Oleg's suggestion to override set is good, but I don't want to lose the ability to assign directly to columns. Christopher's suggestion is also good, but I have too many colum

Re: [SQLObject] Having a modified column filled in automagically...

2008-08-19 Thread Christopher Singley
On Tuesday 19 August 2008 04:08:13 Oleg Broytmann wrote: > On Mon, Aug 18, 2008 at 05:55:28PM -0700, Sam's Lists wrote: > > Okay, unless I'm missing something your answer only works for creation > > time. I want it to record modification time, which is different then > > creation time (except of c

Re: [SQLObject] Having a modified column filled in automagically...

2008-08-19 Thread Oleg Broytmann
On Mon, Aug 18, 2008 at 05:55:28PM -0700, Sam's Lists wrote: > Okay, unless I'm missing something your answer only works for creation > time. I want it to record modification time, which is different then > creation time (except of course at the time of creation, in which case > they'd be the same

Re: [SQLObject] Having a modified column filled in automagically...

2008-08-18 Thread Sam's Lists
Okay, unless I'm missing something your answer only works for creation time. I want it to record modification time, which is different then creation time (except of course at the time of creation, in which case they'd be the same thing.) Thanks Sam On Sun, Aug 17, 2008 at 4:45 AM, Petr Jakeš <[E

Re: [SQLObject] Having a modified column filled in automagically...

2008-08-17 Thread Petr Jakeš
> > > I'd like to be able to create a timestamp column called "mtime" in some of > my columns. This would hold a timestamp of when the row was last modified. > > But I'd like the timestamp to be updated automatically whenever sqlobject > updates anything else in the row. > > How can I do this? I'

[SQLObject] Having a modified column filled in automagically...

2008-08-17 Thread Sam's Lists
Hi... I'd like to be able to create a timestamp column called "mtime" in some of my columns. This would hold a timestamp of when the row was last modified. But I'd like the timestamp to be updated automatically whenever sqlobject updates anything else in the row. How can I do this? I'd like a