Ok, then it is not in the your DataSource class there is a need for
the calculate method, but in your generic filesystem class, to which
the DataSource refers to (through configuration).

As I understand, CakePHP use a DataSource to provide an implementation
independent interface to the DboSource (plus subclasses)
implementation dependent interface.

Thus your FilewidSource class (the implementation dependent interface)
should provide the calculate method.

Am I correct in my understanding of your issue?
Enjoy ;)
   John

On Jan 29, 11:17 am, fain182 <fain...@gmail.com> wrote:
> 2010/1/27 John Andersen <j.andersen...@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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to