thanks for posting that - I was running into the same problems, all is
well now. According to the passing tests :)

On Mar 20, 5:20 pm, Defranco <[EMAIL PROTECTED]> wrote:
> Hi again,
>
> Please discard the code from previous post, it has a lot of bugs.
>
> This is working better:
>
> ______________________
> //app_model.php:
>
>     function __construct($id = false, $table = null, $ds = null){
>
>         parent::__construct($id, $table, $ds);
>
>         //This need to be placed after parent::__construct();
>         $_dbConfig_test = 'test_suite';
>         if ( $this->useDbConfig == $_dbConfig_test)
>                 $this->setDataSource_recursively($_dbConfig_test);
>     }
>
>     function setDataSource_recursively ($dbConfig, $recursive = 5){
>
>         $sub_models = array();
>
>                 if ($this->useDbConfig !== $dbConfig)
>                         $this->setDataSource($dbConfig);
>
>                 if ($recursive >= 0){
>                 foreach ($this->tableToModel as $tableToModel)
>                         $sub_models[] = $tableToModel;
>
>                         foreach ( $sub_models as $model){
>
>                                 if (isset($this->{$model})){
>                                         
> $this->{$model}->setDataSource_recursively($dbConfig, --
> $recursive);
>                                 }
>                         }
>                 }
>     }
> _________
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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