lithium\data\source\MongoDb::configureClass()
Overrides
lithium\data\Source::configureClass()
Configures a model class by overriding the default dependencies for 'set'
and
'entity'
, and sets the primary key to '_id'
, in keeping with Mongo's conventions.
Parameters
-
string
$class
The fully-namespaced model class name to be configured.
Returns
Returnsan 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,
'schema' => [],
'meta' => ['key' => '_id', 'locked' => false]
];
}