Monday, August 22, 2011

Re: afterFind : possible to get query type?

But I need the value IN the afterFind method. Not before or after.

Well I do the checks now in the index and view methods of the controller.

Anja

Am 22.08.2011 16:39, schrieb Thomas Ploch:
> The findQueryType is reset before afterFind() is executed. So assigning
> the value to a class var in beforeFind() and reading it in afterFind()
> should work.
>
> :-)
>
> Am 22.08.2011 16:33, schrieb Anja Liebermann:
>> did that. It is always NULL :(
>>
>> Anja
>>
>> Am 22.08.2011 16:25, schrieb Thomas Ploch:
>>> Look at Model::findQueryType :-)
>>>
>>> Am 22.08.2011 15:56, schrieb Anja Liebermann:
>>>>
>>>> Hello,
>>>>
>>>> is there a possibility to know which query type ( first, all, count
>>>> etc...) was used, when I call afterFind()?
>>>>
>>>> Depending on the query Type I would like to make different checks.
>>>>
>>>> If it is not possible, then I have to do it in the controller in
>>>> several actions.
>>>>
>>>>
>>>> As always: Thanks in advance for any hints!
>>>>
>>>> Anja
>>>>
>>>
>>
>

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate