Re: [sqlalchemy] Is there a way to configure session.commit() so that it automatically return the committed instance's class.__name__ + primary id?

2017-07-25 Thread Jinghui Niu
Thanks Simon. Your answers always help immensely getting to know SA better. I now know the overview. On Tue, Jul 25, 2017 at 1:45 AM, Simon King wrote: > On Tue, Jul 25, 2017 at 2:35 AM, Jinghui Niu wrote: > > I was wondering if there is a way to

Re: [sqlalchemy] Is there a way to configure session.commit() so that it automatically return the committed instance's class.__name__ + primary id?

2017-07-25 Thread Simon King
On Tue, Jul 25, 2017 at 2:35 AM, Jinghui Niu wrote: > I was wondering if there is a way to configure Session.commit() so on each > successful commit, it will return the committed/updated/deleted instance's > class.__name__ + row.id. Is this possible? Thanks. No, there's no

[sqlalchemy] Is there a way to configure session.commit() so that it automatically return the committed instance's class.__name__ + primary id?

2017-07-24 Thread Jinghui Niu
I was wondering if there is a way to configure Session.commit() so on each successful commit, it will return the committed/updated/deleted instance's class.__name__ + row.id. Is this possible? Thanks. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper