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
On Mon, Jul 24, 2017 at 6:01 PM, Ruben Di Battista
wrote:
> Would cause again an IntegrityError. So I modified the recipe like this:
>@event.listens_for(Session, "after_attach")
>def after_attach(session, instance):
># when UserCourse objects are
I'm playing a bit with composite Association Proxies and stumbled upon this
discussion. Just wanted to point out that here:
@event.listens_for(Session, "after_attach")
def after_attach(session, instance):
# when UserCourse objects are attached to a Session,
# figure out what
SQLAlchemy release 1.2.0b2 is now available.
This release repairs an issue in the test suite that would prevent the
suite from passing on Python version 3.6.2. The release is made at the
same time as that of release 1.0.18 and 1.1.12. Also included are
fixes related to ORM use of JSON NULL
SQLAlchemy release 1.1.12 is now available.
This release repairs an issue in the test suite that would prevent the
suite from passing on Python version 3.6.2. The release is made at the
same time as that of release 1.0.18 and 1.2.0b2. Also included are
fixes related to ORM use of JSON NULL
SQLAlchemy release 1.1.12 is now available.
This release repairs an issue in the test suite that would prevent the
suite from passing on Python version 3.6.2. The release is made at the
same time as that of release 1.0.18 and 1.2.0b2. Also included are
fixes related to ORM use of JSON NULL
SQLAlchemy release 1.0.18 is now available.
This release repairs an issue in the test suite that would prevent the
suite from passing on Python version 3.6.2. The release is made at the
same time as that of release 1.1.12 and 1.2.0b2. Additionally, a
backport from release 1.1.7 allowing cx_Oracle
SQLAlchemy release 1.0.18 is now available.
This release repairs an issue in the test suite that would prevent the
suite from passing on Python version 3.6.2. The release is made at the
same time as that of release 1.1.12 and 1.2.0b2. Additionally, a
backport from release 1.1.7 allowing cx_Oracle
On Mon, Jul 24, 2017 at 4:40 AM, Ruben Di Battista
wrote:
> Thanks for taking the time to answer.
>
> Doing what you say means that then I have to import the models classes from
> the sql.py module instead of the models.py. Am I right?
your top example shows the model
Thanks for taking the time to answer.
Doing what you say means that then I have to import the models classes from
the *sql.py* module instead of the *models.py*. Am I right? Or the
association_proxy attribute is then available to the original class (as it
happens when using mapper)? I'm not
10 matches
Mail list logo