allow dynamically adding object classes to types
[matthijs/upstream/django-ldapdb.git] / ldapdb / backends / ldap / compiler.py
index 972606ff4589147a60ec52aa36b26038e047dbe5..3636ede49732edf247d1580a7e5340cfb807e2d4 100644 (file)
@@ -46,7 +46,12 @@ def get_lookup_operator(lookup_type):
         return '='
 
 def query_as_ldap(query):
-    filterstr = ''.join(['(objectClass=%s)' % cls for cls in query.model.object_classes])
+    # TODO: Filtering on objectClass temporarily disabled, since this
+    # breaks Model.save() after an objectclass was added (it queries the
+    # database for the old values to see what changed, but filtering on
+    # the new objectclasses does not return the object).
+    #filterstr = ''.join(['(objectClass=%s)' % cls for cls in query.model.object_classes])
+    filterstr = ''
     sql, params = where_as_ldap(query.where)
     filterstr += sql
     return '(&%s)' % filterstr