I moved `db.session.commit()` outside the loop. That seemed to fix the
error. I'll post an update if I get more errors.
On Wednesday, December 20, 2017 at 6:43:05 PM UTC-5, Lele Gaifax wrote:
>
> Tom Tanner writes:
>
> > I want to query rows and copy them while
Tom Tanner writes:
> I want to query rows and copy them while changing an attribute of each.
> Here's my code.
>
> colObjs= db.session.query(Column).filter_by(chart_id=oldChartID).all()
> for colObj in colObjs:
>make_transient(colObj)
>print colObj.id
>