[sqlalchemy] preserving uselist relation instances in a session.refresh()

2010-03-04 Thread Kent
If I use session.refresh(obj) to re-load an obj that has a one-to-many relational property, the objects in the list are *replaced* instead of *refreshed* if they already exist. Suppose department has a list of employees: suppose dept.employees = [ emp1, emp2 ] session.refresh(dept) the

Re: [sqlalchemy] preserving uselist relation instances in a session.refresh()

2010-03-04 Thread Michael Bayer
Kent wrote: If I use session.refresh(obj) to re-load an obj that has a one-to-many relational property, the objects in the list are *replaced* instead of *refreshed* if they already exist. Suppose department has a list of employees: suppose dept.employees = [ emp1, emp2 ]