[sqlalchemy] session.add() vs session.merge() and delete child

2010-01-30 Thread avdd
I'm using session.add() to refresh my objects while working on them, because I don't want to merge them with the persistent state. But it appears deletes aren't carrying across to child relations: $ cat listdelete.py; python listdelete.py import sqlalchemy as sql from sqlalchemy import orm

Re: [sqlalchemy] session.add() vs session.merge() and delete child

2010-01-30 Thread Michael Bayer
On Jan 30, 2010, at 9:07 AM, avdd wrote: I'm using session.add() to refresh my objects while working on them, because I don't want to merge them with the persistent state. But it appears deletes aren't carrying across to child relations: this example is too compliated for me to understand

Re: [sqlalchemy] session.add() vs session.merge() and delete child

2010-01-30 Thread Michael Bayer
On Jan 30, 2010, at 9:07 AM, avdd wrote: I'm using session.add() to refresh my objects while working on them, because I don't want to merge them with the persistent state. But it appears deletes aren't carrying across to child relations: in r6711 the save-update cascade operation will