diff options
Diffstat (limited to 'lib/sqlalchemy')
-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``. |