code: function(value, schema){
          schema = schema || schemaReflections.getSchema(value);
          if(schema === undefined) {
              throw new Error("can-reflect.getIdentity - Unable to find a schema for the given value.");
          }
  
          var identity = schema.identity;
          if(!identity || identity.length === 0) {
              throw new Error("can-reflect.getIdentity - Provided schema lacks an identity property.");
          } else if(identity.length === 1) {
              return getSetReflections.getKeyValue(value, identity[0]);
          } else {
              var id = {};
              identity.forEach(function(key){
                  id[key] = getSetReflections.getKeyValue(value, key);
              });
              return JSON.stringify(schemaReflections.cloneKeySort(id));
          }
      }
docs: @function can-reflect.getIdentity getIdentity
  @parent can-reflect/shape
  @description Get a unique primitive representing an object.
  
  @signature `getIdentity( object [,schema] )`
  
  This uses the object's schema, or the provided schema to return a unique string or number that
  represents the object.
  
  ```js
  import canReflect from "can-reflect";
  
  canReflect.getIdentity({id: 5}, {identity: ["id"]}) //-> 5
  ```
  
  If the schema has multiple identity keys, the identity keys and values
  are return stringified (and sorted):
  
  ```js
  canReflect.getIdentity(
  {z: "Z", a: "A", foo: "bar"},
  {identity: ["a","b"]}) //-> '{"a":"A","b":"B"}'
  ```
  
  @param  {Object|Function} object A map-like object.
  @param {Object} [schema] A schema object with an `identity` array of the unique
  keys of the object like:
  ```js
  {identity: ["id"]}
  ```
  @return {Number|String} A value that uniquely represents the object.