Friday, January 29, 2010

Re: datasource and count()

2010/1/27 John Andersen <j.andersen.lv@gmail.com>:
> Ok, I would like to understand what is your issue here, because I do
> not see a calculate method in the DataSource class! Do you mean the
> DboSource?
>   John

I tried to make a $this->Image->find('count'); on the model with my
datasource, and it gives error:
Fatal error: Call to undefined method FilewidSource::calculate() in
/home/fain182/workspace/cake/libs/model/model.php on line 2042

if you read the source of _findCount() you see that use calculate..
http://api.cakephp.org/view_source/model/#line-2040

maybe with a behaviour i could change this..
but it's a little dirty make a datasource that depends on behavior..

--
pietro

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: