[sqlalchemy] Re: Data logging and many-to-many's

2008-11-20 Thread Joril
Quite complicated, I see X-) Anyway, I've been able to implement the clean way you suggested (or at least the test suite says so :) ).. Many thanks again for your time, you've been very helpful! (Thanks to Svil too for your contribution!) --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: Data logging and many-to-many's

2008-11-19 Thread Michael Bayer
a guaranteed stable way that doesn't rely on SQLAlchemy implementation details and is easy to understand is here. this is how I would do it: http://pastebin.com/f6670eebe Joril wrote: Hi everyone! I'm still working on implementing data logging with SQLAlchemy (=whenever someone updates a

[sqlalchemy] Re: Data logging and many-to-many's

2008-11-19 Thread Joril
On 19 Nov, 16:28, Michael Bayer [EMAIL PROTECTED] wrote: a guaranteed stable way that doesn't rely on SQLAlchemy implementation details and is easy to understand is here.  this is how I would do it: http://pastebin.com/f6670eebe I see, many thanks for yor time :) Out of curiosity, is there a

[sqlalchemy] Re: Data logging and many-to-many's

2008-11-19 Thread Michael Bayer
Joril wrote: On 19 Nov, 16:28, Michael Bayer [EMAIL PROTECTED] wrote: a guaranteed stable way that doesn't rely on SQLAlchemy implementation details and is easy to understand is here.  this is how I would do it: http://pastebin.com/f6670eebe I see, many thanks for yor time :) Out of

[sqlalchemy] Re: Data logging and many-to-many's

2008-11-19 Thread Joril
On 19 Nov, 17:22, Michael Bayer [EMAIL PROTECTED] wrote: Out of curiosity, is there a solution that wouldn't require creating new instances of the objects? (Some magic incantation like the del instance_state(entity).key you suggested me some time ago, I guess..?) not really since you'd

[sqlalchemy] Re: Data logging and many-to-many's

2008-11-19 Thread Michael Bayer
Joril wrote: I see.. But - sorry if I insist - are you implying that it would be too difficult to do? I know it'd be a kind of ugly hack, but since I spent almost the whole day looking for it, now I'm wondering if I was looking for something that doesn't exist at all X-) you'd need to use a

[sqlalchemy] Re: Data logging

2008-10-06 Thread Michael Bayer
the cleanest way is to leave the old entity alone and to create a new one using a copy constructor: class MyEntity(object): def new_version(self): return MyEntity(version = self.version + 1, foo=self.foo, bar=self.bar) To force an object from an UPDATE back to an INSERT, which is

[sqlalchemy] Re: Data logging

2008-10-06 Thread Joril
Perfect! Thanks again! --~--~-~--~~~---~--~~ 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 [EMAIL