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
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
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
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
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
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
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
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