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
--- 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.