Ticket Details
Model::find() does not respect array-based finders
BUG Ticket (closed)
###What happened:
- Adding custom finders with an array of $options does not work
###What was expected:
- Call to Model::find('custom', array(/* something */)); borks
- Resulting query does not include $options
{{{
// Finder options
$options = array(
'fields' => array('name', 'created'),
'conditions' => array(
'created' => array(
'>=' => date('Y-m-d', strtotime('7 days ago'))
)
)
);
Companies::find('all', $options);
// SELECT name, created FROM `companies` AS `Companies` WHERE (`created` >= '2011-05-16');
Companies::finder('lastWeek', $options);
// SELECT * FROM `companies` AS `Companies`;
}}}
#### Changes
Added some code to Model::find()
Patch available at:
http://dev.lithify.me/forks/trooney/lithium/commits/view/68ad1bb154573614ce4280254ca71c99f5ae13f2
Updates
(fixed)
on 06.02.11
by Howard
- owner was changed to Howard
- status was changed to closed
- resolution was changed to fixed
(fixed)
on 06.05.11
by nate
- owner was changed to nate
- status was changed to closed
- resolution was changed to fixed