[entity] warn if bad fetch_attrs stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 17 Aug 2009 11:06:02 +0200
branchstable
changeset 2872 9d641d98cc86
parent 2871 83c5499e1436
child 2873 51bcd8e8f65c
[entity] warn if bad fetch_attrs
entity.py
--- a/entity.py	Mon Aug 17 11:05:28 2009 +0200
+++ b/entity.py	Mon Aug 17 11:06:02 2009 +0200
@@ -251,6 +251,8 @@
                 desttype = rschema.objects(eschema.type)[0]
                 card = rschema.rproperty(eschema, desttype, 'cardinality')[0]
                 if card not in '?1':
+                    self.warning('bad relation %s specified in fetch attrs for %s',
+                                 attr, self.__class__)
                     selection.pop()
                     restrictions.pop()
                     continue