Is there somewhere an adapter for cakephp 3.x model to handle 2.x syntax? Like, internally, it just convert syntax like this:
array(
'conditions' => array('Model.field' => $thisValue),
'fields' => array('Model.field1', 'DISTINCT Model.field2'),
'order' => array('Model.created', 'Model.field3 DESC'),
'group' => array('Model.field'),
'limit' => n
)
into:
$query->select('Model.field1')
->distinct('Model.field2')
->order->(['Model.created', 'Model.field3' => 'DESC'])
->group('Model.field')
->where('Model.field' => $thisValue)
and return executed query ->toArray(). So the model of 2.x, becomes compatible with 3.x.
Many thanks to any advises.