Fixed a caching issue with TypedAttributes.

This commit is contained in:
Griatch 2012-03-29 20:30:35 +02:00
parent 82a10903d1
commit d4c97d7df8
3 changed files with 18 additions and 5 deletions

View file

@ -81,6 +81,17 @@ class TypedObjectManager(idmapper.manager.SharedMemoryManager):
except Exception:
return None
return dbref
@returns_typeclass_list
def get_with_attr(self, attribute_name, attribute_value=None):
"""
Returns the typeclassed entity depending on having a given attribute.
attribute_name - only entities with an attribute of this name will be included in match
attribute_value - if != None, only entities with db.attribute_name=attribute_value will match.
"""
self.filter()
@returns_typeclass
def dbref_search(self, dbref):