fixes for #315 issue

This commit is contained in:
Wilson Júnior
2011-10-12 18:28:40 -03:00
parent 76d771d20f
commit 3d817f145c
3 changed files with 11 additions and 11 deletions

View File

@@ -76,6 +76,16 @@ class Document(BaseDocument):
by setting index_types to False on the meta dictionary for the document.
"""
__metaclass__ = TopLevelDocumentMetaclass
@apply
def pk():
"""Primary key alias
"""
def fget(self):
return getattr(self, self._meta['id_field'])
def fset(self, value):
return setattr(self, self._meta['id_field'], value)
return property(fget, fset)
@classmethod
def _get_collection(self):