lithium\data\source\http\adapter\CouchDb::configureClass()

public method

Configures a model class by setting the primary key to 'id', in keeping with CouchDb conventions.

Parameters

  • string $class

    The fully-namespaced model class name to be configured.

Returns

Returns

an array containing keys 'classes' and 'meta', which will be merged with their respective properties in Model.

Source

	public function configureClass($class) {
		return [
			'classes' => $this->_classes,
			'meta' => ['key' => 'id', 'locked' => false],
			'schema' => [
				'id' => ['type' => 'string'],
				'rev' => ['type' => 'string']
			]
		];
	}