diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-19 17:47:40 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-19 17:47:40 -0500 |
commit | 8e6d27c8a4bef3ec4ca404cba88a968f6b1f1832 (patch) | |
tree | 1791886feaa53ca9235395d5b94cee07f3a64045 /lib/sqlalchemy/ext/sqlsoup.py | |
parent | 3687d7ab56841700fb087c8f0ddf0e3912e05cfd (diff) | |
download | sqlalchemy-8e6d27c8a4bef3ec4ca404cba88a968f6b1f1832.tar.gz |
narrow down cascades in session some more
Diffstat (limited to 'lib/sqlalchemy/ext/sqlsoup.py')
-rw-r--r-- | lib/sqlalchemy/ext/sqlsoup.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/sqlsoup.py b/lib/sqlalchemy/ext/sqlsoup.py index 9ff503dfa..6981919cf 100644 --- a/lib/sqlalchemy/ext/sqlsoup.py +++ b/lib/sqlalchemy/ext/sqlsoup.py @@ -359,7 +359,7 @@ from sqlalchemy import schema, sql, util from sqlalchemy.engine.base import Engine from sqlalchemy.orm import scoped_session, sessionmaker, mapper, \ class_mapper, relationship, session,\ - object_session + object_session, attributes from sqlalchemy.orm.interfaces import MapperExtension, EXT_CONTINUE from sqlalchemy.exceptions import SQLAlchemyError, InvalidRequestError, ArgumentError from sqlalchemy.sql import expression @@ -384,7 +384,8 @@ class AutoAdd(MapperExtension): def init_instance(self, mapper, class_, oldinit, instance, args, kwargs): session = self.scoped_session() - session._save_without_cascade(instance) + state = attributes.instance_state(instance) + session._save_impl(state) return EXT_CONTINUE def init_failed(self, mapper, class_, oldinit, instance, args, kwargs): |