After some months where working for another company brought me away
from cake :-( now I have to do some developement on a Cake application
I wrote months ago.

First of all I updated from 1.1.15.5144 to 1.1.19.6305

But now I have an unexpected result with a findAll() on a query. Maybe
in the past month something changhed in Cake and I have miss it, so
I'm asking your help.

I have a model Order wich $hasMany = 'Donetask' and $belongsTo =
'Client,User'
When a run a findAll() query on Order it returns all the Orders, each
one with the associates Client and User, but none of the many
associates Donetasks.

Printing the resultset with debug() reports the right associated
models but looks like the Donetasks array is empty:

Array
(
    [0] => Array
        (
            [Order] => Array
                (
                    [id] => 00019281
                    [titolo] => PANTALONE
                    [stagione] => S
                    [client_id] => 23
                    [user_id] => 1
                    [created] => 2008-07-03
                    [modified] => 2008-07-04 17:25:27
                )

            [Client] => Array
                (
                    [id] => 00023
                    [nomeazienda] => Manifatture del Nord srl
unipersonale
                    [codcliente] => 1052
                    [codcad] =>
                    [created] => 2005-11-16 10:18:50
                    [modified] => 2006-02-27 05:11:51
                    [deleted] =>
                )

            [Donetask] => Array
                (
                )

        )

When I set the debug level to 2 the resulting Donetask query looks as
follow, maybe is the IN() parts that creats problems?

SELECT `Donetask`.`id`, `Donetask`.`order_id`,
`Donetask`.`donework_id`, `Donetask`.`task_id`, `Donetask`.`user_id`,
`Donetask`.`tempo`, `Donetask`.`pezzi`, `Donetask`.`metri`,
`Donetask`.`note`, `Donetask`.`created`, `Donetask`.`modified`,
`Donetask`.`costo_tecnico_cr`, `Donetask`.`prezzo_tecnico_cr`,
`Donetask`.`prezzo_praticato_cr`, `Donetask`.`note_v`,
`Donetask`.`facon`, `Donetask`.`mag_facon`, `Donetask`.`prezzo_il`
FROM `donetasks` AS `Donetask` WHERE `Donetask`.`order_id` IN
('00019281', '00019280', '00019279', '00019278', '00019277',
'00019276', '00019275', '00019274', '00019273', '00019272',
'00019271', '00019269', '00019268', '00019267', '00019266',
'00019265', '00019264', '00019263', '00019262', '00019261')

Note that just before the upgrate the results where ok

Thank you for any hints ;-)

Stefano

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

Reply via email to