On Wed, Dec 20, 2017 at 5:38 PM, Tom Tanner
wrote:
> 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
>
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
del colObj.id
colObj.chart_id= newChartID
db.session.add(co