Change the key name to not include entity type
authorSverre Rabbelier <srabbelier@gmail.com>
Wed, 03 Dec 2008 23:48:33 +0000
changeset 661 d7b643255255
parent 660 5a381b290691
child 662 0e89b027b140
Change the key name to not include entity type This allows for direct lookup by scope_path, rather than having to do more complex things. Patch by: Sverre Rabbelier
app/soc/logic/models/base.py
--- a/app/soc/logic/models/base.py	Wed Dec 03 23:48:10 2008 +0000
+++ b/app/soc/logic/models/base.py	Wed Dec 03 23:48:33 2008 +0000
@@ -108,7 +108,7 @@
     """Returns the KeyName constructed from kwargs for this type of entity.
 
     The KeyName is in the following format:
-    entity.name:<key_value1>:<key_value2>:...:<key_valueN>
+    <key_value1>:<key_value2>:...:<key_valueN>
     """
 
     # get the KeyFieldNames for this entity
@@ -132,7 +132,7 @@
       keyvalues.append(kwargs[key_field_name])
 
     # construct the KeyName in the appropriate format
-    return "%s:%s" % (self._name, '/'.join(keyvalues))
+    return '/'.join(keyvalues)
 
   def getFullModelClassName(self):
     """Returns fully-qualified model module.class name string.