# HG changeset patch # User Sylvain Thénault # Date 1249082602 -7200 # Node ID 3c7edaa6c6d2dd91d71aeba50478127feee0fce3 # Parent 1b9d08840a0e29a330f38dac9f9409fb388a2745 oops, should have been in a earlier commit (META_RELATION_TYPES renaming) diff -r 1b9d08840a0e -r 3c7edaa6c6d2 schema.py --- a/schema.py Sat Aug 01 01:22:01 2009 +0200 +++ b/schema.py Sat Aug 01 01:23:22 2009 +0200 @@ -38,7 +38,7 @@ VIRTUAL_RTYPES = set(('eid', 'identity', 'has_text',)) # set of meta-relations available for every entity types -META_RELATIONS_TYPES = set(( +META_RTYPES = set(( 'owned_by', 'created_by', 'is', 'is_instance_of', 'identity', 'eid', 'creation_date', 'modification_date', 'has_text', 'cwuri', )) @@ -245,7 +245,7 @@ attribute defined in the entity schema """ for rschema, _ in self.attribute_definitions(): - if not (rschema in META_RELATIONS_TYPES + if not (rschema in META_RTYPES or self.is_metadata(rschema)): return rschema @@ -328,7 +328,7 @@ @property def meta(self): - return self.type in META_RELATIONS_TYPES + return self.type in META_RTYPES def update(self, subjschema, objschema, rdef): super(CubicWebRelationSchema, self).update(subjschema, objschema, rdef)