From: Mike Bayer Date: Sat, 16 Aug 2008 22:41:57 +0000 (+0000) Subject: - class.someprop.in_() raises NotImplementedError pending X-Git-Tag: rel_0_5rc1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e08949eb57592f4e3b3c1c8b92ef8935c150df7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - class.someprop.in_() raises NotImplementedError pending the implementation of "in_" for relation [ticket:1140] --- diff --git a/CHANGES b/CHANGES index 3bfbfe88e3..822b756d3d 100644 --- a/CHANGES +++ b/CHANGES @@ -29,7 +29,10 @@ CHANGES well as query.join(). Note that in some scenarios the IN clause will appear in the WHERE clause of the query as well since this discrimination has multiple trigger points. - + + - class.someprop.in_() raises NotImplementedError pending + the implementation of "in_" for relation [ticket:1140] + - Improved the behavior of query.join() when joining to joined-table inheritance subclasses, using explicit join criteria (i.e. not on a relation). diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index 3f61f3ebd2..4056c2ff91 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -325,7 +325,10 @@ class PropertyLoader(StrategizedProperty): def of_type(self, cls): return PropertyLoader.Comparator(self.prop, self.mapper, cls) - + + def in_(self, other): + raise NotImplementedError("in_() not yet supported for relations. For a simple many-to-one, use in_() against the set of foreign key values.") + def __eq__(self, other): if other is None: if self.prop.direction in [ONETOMANY, MANYTOMANY]: