it’s probably that delete-orphan on the many-to-one, that’s pretty awkward. the single_parent=True flag is kind of saying, “you’re doing something crazy, are you sure?”. If you delete the Foo(), then every Bar will be deleted in any case via Foo.bar_all (“orphan” is defined as, not referred to by all parent relationships with delete-orphan, so if any are missing, it’s an orphan), unless Foo.bar_latest includes a Bar that isn’t in bar_all ?
> On Nov 6, 2014, at 12:40 PM, Jonathan Vanasco <jvana...@gmail.com> wrote: > > For the next person: > > I was able to get around this by doing the following: > > * do not eagerload any of the relations, probably best to keep them out of > the identity map altogether > * use the sql expressions api to handle any migrations/work > > dbSession.execute( > model.core.Foo.__table__\ > .update()\ > > dbSession.execute( > model.core.Foo.__table__\ > .delete()\ > > > > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com > <mailto:sqlalchemy+unsubscr...@googlegroups.com>. > To post to this group, send email to sqlalchemy@googlegroups.com > <mailto:sqlalchemy@googlegroups.com>. > Visit this group at http://groups.google.com/group/sqlalchemy > <http://groups.google.com/group/sqlalchemy>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.