UnionOfRAD/lithium — pull request #740 by jails (2012-12-14 16:55:11+00:00)
Title: Allow `data\source\Database` to support a generic syntax for creating records.

Using `data\source\MongoDb`, the correct syntax to insert a element is:

$db = Connections::get('mongo');
$options = array(
'type' => 'create',
'source' => 'source,
'data' => array(
'data' => array(/* the datas */)
)
);
$db->create($query);

Using `data\source\Database`, the correct syntax to insert a element is:

$db = Connections::get('mongo');
$options = array(
'type' => 'create',
'source' => 'source,
'data' => array(/* the datas */)
);
$db->create($query);

This pull request allow the `'data' => array('data' => array(/* the datas */))` syntax for `data\source\Database` to allow a generic way to write queries and make `data\model\Query` non dependant of the datasource.