whole_func_string: function(props) {
              var inst,
                  cls = this,
                  key = props[cls.keyAttr];
  
              if (key && _.has(cls.cache, key)) {
  
                  inst = cls.cache[key];
                  // Check the updated flag
                  inst.merge(props);
  
              } else {
                  inst = new cls(props);
  
                  if (key) {
                      cls.cache[key] = inst;
                  }
  
                  inst.on("change:"+cls.keyAttr, function(model, key) {
                      var oldKey = model.previous(cls.keyAttr);
                      if (oldKey && _.has(cls.cache, oldKey)) {
                          delete cls.cache[oldKey];
                      }
                      cls.cache[key] = inst;
                  });
              }
  
              return inst;
          }
func_code_string: function(props) {
              var inst,
                  cls = this,
                  key = props[cls.keyAttr];
  
              if (key && _.has(cls.cache, key)) {
  
                  inst = cls.cache[key];
                  // Check the updated flag
                  inst.merge(props);
  
              } else {
                  inst = new cls(props);
  
                  if (key) {
                      cls.cache[key] = inst;
                  }
  
                  inst.on("change:"+cls.keyAttr, function(model, key) {
                      var oldKey = model.previous(cls.keyAttr);
                      if (oldKey && _.has(cls.cache, oldKey)) {
                          delete cls.cache[oldKey];
                      }
                      cls.cache[key] = inst;
                  });
              }
  
              return inst;
          }
func_documentation_string: works for activities and activityobjects