Sorry for the very beginner question, but I haven't been able to find
a good discussion of this issue online (possibly because it's too
basic).

I'm using sqlalchemy as part of a basic web-based CRUD-style CMS. I've
got the Create, Read and Delete parts down, but I'm not sure how best
to handle the Update part. Because the update page handler functions
are generic and reused for many different models, all I can be sure of
is having a single object instance, and a dictionary of new values
with which to update the instances attributes. All I can think of
doing is

instance.__dict__.update(value_dict)

Which I've heard is not the way to do it, and also seems to be leaving
out certain dictionary values in some cases. Is there an accepted way
to handle these kinds of operations?

Thanks,
Eric
--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to