SECOND EMAIL, DISREGARD FIRST :-)

If I need to update a property on a set of objects, what's the 
recommended way to do this?  Ideally it would be simple, but not require 
excessive querying.  I could do:

db.query(Email).get(id).spam = True

but that requires N selects and N updates.

I could do:

email_table.update().where(email_table.c.email_id.in_(id_list)).values(spam=True))

But that seems to require some way of committing the result.  I haven't found 
out how to do that, and I'm not sure this is the "sanctioned" way of doing this 
anyway.

Any guidance is appreciated.


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

Reply via email to