app/soc/logic/models/base.py
changeset 533 ba3309b2fd30
parent 512 aae25d2b4464
child 534 c31cfbf1a20f
--- a/app/soc/logic/models/base.py	Fri Nov 21 08:38:53 2008 +0000
+++ b/app/soc/logic/models/base.py	Fri Nov 21 08:41:23 2008 +0000
@@ -56,7 +56,7 @@
     if name:
       self._name = name
     else:
-      self._name = self.getModelClassName()
+      self._name =  self._model.__name__
     
     if skip_properties:
       self._skip_properties = skip_properties
@@ -101,18 +101,12 @@
       keyvalues.append(kwargs[key_field_name])
 
     # construct the KeyName in the appropriate format
-    return ":".join([self._name] + keyvalues)
-
-  def getModelClassName(self):
-    """Returns model class name string.
-    """ 
-    return self._model.__name__ 
+    return "%s:%s" % (self._name, '/'.join(keyvalues))
 
   def getFullModelClassName(self):
     """Returns fully-qualified model module.class name string.
     """ 
-    return '%s.%s' % (self._model.__module__,
-                      self.getModelClassName()) 
+    return '%s.%s' % (self._model.__module__, self._model.__name__)
 
   def getKeyValues(self, entity):
     """Exctracts the key values from entity and returns them.
@@ -474,6 +468,10 @@
       supplied key_name and properties.
     """
 
+    import logging
+    logging.info(key_name)
+    logging.info(properties)
+
     entity = self.getFromKeyName(key_name)
 
     if not entity: