yup. specifically with the session.delete() thing, by you saying
parent.collection.remove(obj), you're doing the collection management
yourself. delete(x) doesn't work since SQLA does not attempt to
locate all the collections which "x" is a part of.It's a very
common issue but we don
Hi Mike,
Thanks. I learning SQA and I am trying to get the general feeling.
I guess the idea is to use Python directly and Session take care of
the SQL in the background.
mOutOrder = mapper(dbOutOrder, tbl_outHeader, properties={'lines':
relation(dbOutLine, cascade="all, delete-orphan")})
mOutLin
On Oct 24, 2008, at 9:08 PM, jack2318 wrote:
>
> I am really sorry but I pressed POST before I was ready. So again the
> code (without comments)
>
>
> session = Session()
>order = session.query(dbOutOrder).get(2)
>
>for line in order.lines:
> session.delete(line)