Hello,
I'm running a TG (v1.0.2.2) project using SA (v0.3.10). I have renamed
all the tables and columns in the default SA setup, including the
visit table. This works nice, except from when TG wants to update the
visit key in update_queued_visits() in turbogears.visit.savisit. This
code tries to update the column 'expired' for the row with the key
'visit_key'. This failes despite the fact that I have mapped these
columns in model.py like this (removed some columns from the code):
assign(Visit, visits_table,
properties=dict(visit_key=visits_table.c.vst_VisitKey,
expiry=visits_table.c.vst_Expiry, [...]))
I had to rewrite the way the visit table is updated to get this
working. By replacing the following
get_engine().execute(table.update(table.c.visit_key==visit_key,
values={'expiry': expiry}))
with
visit = visit_class.lookup_visit(visit_key)
visit.expiry = expiry
session.flush()
everything works as expected. Is this the correct way to deal with the
problem? If so, maybe this should be patched into TG?
Regards,
Tom
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---