From: Frank B. <fb...@fo...> - 2003-05-06 09:58:13
|
Hallo Ian, Ian Bicking hat gesagt: // Ian Bicking wrote: > I think I fixed the caching problem you've been having -- there was some > old code based on the lazy fetching of columns that was causing a > problem. I did an update but I still get the same wrong behaviour, when I turn caching on. To clarify my problem: It only (AFAIK) affects Joins. To give an example using the people.py: A Page should make editing the PhoneNumbers possible: pid = getPersonIDSomehow() p = Person(pid) for number in p.phoneNumbers: self.writeln(""" <form> <input type="hidden" name="NumberID" value="%d"> <input type=input name="PhoneNumber" value="%s"> <input type=input name="Type" value="%s" <input type=submit name="_action_Change" value="Change"> </form> """ % (number.id, number.PhoneNumber, number.PhoneType) ) def Change(self): req = self.request() id = int(req.value('NumberID', None)) num = req.value('PhoneNumber', None) type = req.value('Type', None) p = PhoneNumber(id) p.phoneNumber = num p.phoneType = type If Change() is called, the database actually gets updated, but if the edit form is showed in the response, it doesn't reflect the changes in the list of PhoneNumbers. As I said, only Joins like p.phoneNumbers are affected by this. I can, and always could edit "Person"s directly without the caching errors, only their Phones are messed up. ciao -- Frank Barknecht _ ______footils.org__ |