[sqlalchemy] Re: related object list not being updated on delete

2006-10-27 Thread Hogarty, David A.
the flush() operation. On Oct 26, 2006, at 5:13 PM, Hogarty, David A. wrote: I'm having a problem where phantom child objects stay attached to a parent object after having been deleted. For example: def test_add_delete_parameter(self): p = Project(name='ptest') db.session.save(p

[sqlalchemy] Re: related object list not being updated on delete

2006-10-27 Thread Hogarty, David A.
will result in its getting deleted during the flush() operation. On Oct 26, 2006, at 5:13 PM, Hogarty, David A. wrote: I'm having a problem where phantom child objects stay attached to a parent object after having been deleted. For example: def test_add_delete_parameter(self): p = Project(name

[sqlalchemy] Re: related object list not being updated on delete

2006-10-27 Thread Hogarty, David A.
, which is referenced by the nodes property. if Node is an abstract (uninstantiated) class, you could do it the other way around too, i.e. algorithms and parameters are the real collections and nodes is just the sum of both. On Oct 27, 2006, at 3:00 PM, Hogarty, David A. wrote: Here's a quick

[sqlalchemy] related object list not being updated on delete

2006-10-26 Thread Hogarty, David A.
I'm having a problem where phantom child objects stay attached to a parent object after having been deleted. For example: def test_add_delete_parameter(self): p = Project(name='ptest') db.session.save(p) db.session.flush() p.parameters.append(Parameter(name='p1'))