Thanks, I used the first method. Follow up question: How do I get the new
primary key after running `session.commit()`?
On Tuesday, December 19, 2017 at 11:29:34 AM UTC-5, Mike Bayer wrote:
>
> On Tue, Dec 19, 2017 at 3:02 AM, Tom Tanner
> > wrote:
> > I'm using SQLAlchemy with the Python libra
On Tue, Dec 19, 2017 at 3:02 AM, Tom Tanner
wrote:
> I'm using SQLAlchemy with the Python library Flask.
>
> How do I query an object from a database, make a copy of it, and save that
> copy to the database?
>
> Example of querying an object.
> someObj = db.session.query(SomeDataTable).filter_by(i
I'm using SQLAlchemy with the Python library Flask.
How do I query an object from a database, make a copy of it, and save that
copy to the database?
Example of querying an object.
someObj = db.session.query(SomeDataTable).filter_by(id=someID).first()
I want to save a copy of `someObj` to the t