The Identifiable behavior automatically saves an identifier in the document.
NOTE: This behavior only can be used with EmbeddedDocuments
array(
'Model\Article' => array(
'fields' => array(
'field' => 'string',
),
'behaviors' => array(
array(
'class' => 'Mongator\Behavior\Identifiable',
'options' => array(
)
),
),
),
);
idField
(default 'token'): field used to store the ididGeneratorMethod
(default null): callable that returns the id