How do I update a PickleCol to the database?
Class Thingy(SQLObject):
dicty = PickleCol()
testy = StringCol()
thingy = Thingy(dicty={'foo': 'bar'} testy='foo') # it shows up in
mysql
thingy.testy = 'Hello, world!' # updated in mysql
thingy.dicty['foo'] # returns what you'd expect
thingy.dicty['foo'] = 'baz' *not* updated in mysql
thing.dicty['foo'] # returns 'baz', as expected!
thing.dicty = {'foo': 'mumble', 1: 2} # updated in mysql
Is there really no other way to update a PickleCol to the database? I
can use copy.copy() to create scratch space, but I'd prefer to work on
the attribute itself...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---