filter() means you're not writing SQL fragments, and don't have to worry about proper escaping of field names and getting the table name right.
On 5/04/2013, at 8:23 AM, Damian Mooyman <notifications@github.com> wrote:

>> 			->setDataQueryParam(array(
>> 				'Versioned.mode' => $onlyDeletedFromStage ? 'stage_unique' : 'stage',
>> 				'Versioned.stage' => 'Live'
>> 			));
>> 
>> -		if(!$showAll) $children = $children->filter('ShowInMenus', 1);
>> +		if(!$showAll) {
>> +			$children = $children->where(array('"ShowInMenus"' => 1));
>> +		}
> 
> I didn't see the benefit in using the filter functionality here where the (simpler) parameterised query condition would do the job. Maybe I misunderstood the purpose of the use of the filter here?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/silverstripe/sapphire/pull/1360/files#r3661613

---
Simon Welsh
Admin of http://simon.geek.nz/