2010/10/22 Michael Bayer <mike...@zzzcomputing.com>

>
> query has an update():
>
> query(MyTable).filter(MyTable.id==5).update(myDict)
>
> otherwise:
>
> for k in myDict:
>     setattr(some_object, k, myDict[k])
> Session.commit()
>
>
yeap, update() is doing what i want.



> same techniques, update myDict with {'categories':[x, y, z]}
>

Nope, adding 'categories' in myDict doesnt update relation. There is nothing
about relations' update in sql statement which generated by update().


-- 
Aydın Şen

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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