diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-06-02 19:36:28 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-06-02 19:36:28 +0000 |
commit | aa32c6d6fd2766bedf19cccb767aa46ceac3264f (patch) | |
tree | 7c09ab8ebb28e00c7ca7b4c7a68b1181c7b1e13d /lib | |
parent | d518d49d8ecf6393dbb3ba4d11e987a798db2107 (diff) | |
download | sqlalchemy-aa32c6d6fd2766bedf19cccb767aa46ceac3264f.tar.gz |
added reset_joinpoint() feature for query, interim until 0.4
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sqlalchemy/orm/query.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index 74d4ceed7..2266f9fa8 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -736,6 +736,18 @@ class Query(object): q._joinpoint = mapper return q + def reset_joinpoint(self): + """return a new Query reset the 'joinpoint' of this Query reset + back to the starting mapper. Subsequent generative calls will + be constructed from the new joinpoint. + + This is an interim method which will not be needed with new behavior + to be released in 0.4.""" + + q = self._clone() + q._joinpoint = q._mapper + return q + def select_from(self, from_obj): """Set the `from_obj` parameter of the query and return the newly resulting ``Query``. |