From a1fe6e2c7607740c46eaab89e2bcd70aaccee71e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 20 Jun 2007 22:28:54 +0000 Subject: - forwards-compatibility with 0.4: added one(), first(), and all() to Query - added selectone_by() to assignmapper --- lib/sqlalchemy/ext/assignmapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/ext/assignmapper.py') diff --git a/lib/sqlalchemy/ext/assignmapper.py b/lib/sqlalchemy/ext/assignmapper.py index b124de8f6..4708afd8d 100644 --- a/lib/sqlalchemy/ext/assignmapper.py +++ b/lib/sqlalchemy/ext/assignmapper.py @@ -43,7 +43,7 @@ def assign_mapper(ctx, class_, *args, **kwargs): m = mapper(class_, extension=extension, *args, **kwargs) class_.mapper = m class_.query = classmethod(lambda cls: Query(class_, session=ctx.current)) - for name in ['get', 'filter', 'filter_by', 'select', 'select_by', 'selectfirst', 'selectfirst_by', 'selectone', 'get_by', 'join_to', 'join_via', 'count', 'count_by', 'options', 'instances']: + for name in ['get', 'filter', 'filter_by', 'select', 'select_by', 'selectfirst', 'selectfirst_by', 'selectone', 'selectone_by', 'get_by', 'join_to', 'join_via', 'count', 'count_by', 'options', 'instances']: monkeypatch_query_method(ctx, class_, name) for name in ['flush', 'delete', 'expire', 'refresh', 'expunge', 'merge', 'save', 'update', 'save_or_update']: monkeypatch_objectstore_method(ctx, class_, name) -- cgit v1.2.1