code: function persist(modelfunc, keyfield)
  {
  	/*jshint newcap:false */
  	assert(typeof modelfunc === 'function');
  
  	if (!modelfunc.prototype.__properties && !modelfunc.prototype.serialize)
  		throw(new Error('persist only accepts polyclay models'));
  
  	// We must supply either a keyfield parameter or already have a 'key' property.
  	var keyprop = Object.getOwnPropertyDescriptor(modelfunc.prototype, 'key');
  	if (!keyprop)
  	{
  		if (!keyfield)
  			keyfield = '_id';
  
  		Object.defineProperty(modelfunc.prototype, 'key',
  		{
  			get: function getKey()
  			{
  				return this[this.keyfield];
  			},
  			set: function setKey(v)
  			{
  				this[this.keyfield] = v;
  			},
  			enumerable: true
  		});
  	}
  	else
  		keyfield = 'key';
  
  	modelfunc.prototype.keyfield = keyfield;
  
  	_.assign(modelfunc, persist.statics);
  	_.assign(modelfunc.prototype, persist.plugins);
  }
docs: -----------------------------------------------------------------