Its hard to understand why this conflit is still present in cake 2.1, as it 
has been noticed by many people since version 1.2. I made tons of searches 
in google and coudnt find any useful awnser.
I was testing it in cake 2.0, but when i figured out that it was a cake 
problem i tryed to update to 2.1, expecting it to be fixed, but it wasnt

When you try to set up the $actas to the translate behaviour, use belongsto 
relationship in your models, and try to paginate recursively the results, 
you get an error. 

What i'm trying to do:

Retrieve a list of packages, and for each package in the list, ill print a 
list of itineraries for that package. To retrieve this content, i'm using 
$this->{$model_name}->recursive = 2.
If i comment the lines of the actas, the page works and displays the list 
of packages and itineraries for each package, but all in the default 
language. If i add the actas, and use recursive = 1, it also works, but do 
not give me the itinerary data that i need to display in each package.

Ill give you my model structure.

Package hasmany ItineraryPackages
Itinerary hasmany ItineraryPackages
ItineraryPackages belongsto Package
ItineraryPackages belongsto Itinerary

Why i'm not using the HABTM relation?
Because the ItineraryPackages has a description and order field. The 
description of ItineraryPackages is also using the translate behaviour for 
the column description.

*Fatal Error* (256): [PDOException] SQLSTATE[42S22]: Column not found: 1054 
Unknown column 'I18n__nameTranslation.content' in 'field list'
> #0 C:\wamp\www\lib\Cake\Model\Datasource\DboSource.php(437): 
> PDOStatement->execute(Array)
> #1 C:\wamp\www\lib\Cake\Model\Datasource\DboSource.php(403): 
> DboSource->_execute('SELECT `Package...', Array)
> #2 C:\wamp\www\lib\Cake\Model\Datasource\DboSource.php(647): 
> DboSource->execute('SELECT `Package...', Array, Array)
> #3 C:\wamp\www\lib\Cake\Model\Datasource\DboSource.php(1300): 
> DboSource->fetchAll('SELECT `Package...', false)
> #4 C:\wamp\www\lib\Cake\Model\Datasource\DboSource.php(1169): 
> DboSource->fetchAssociated(Object(PackageType), 'SELECT `Package...', Array)
> #5 C:\wamp\www\lib\Cake\Model\Datasource\DboSource.php(1087): 
> DboSource->queryAssociation(Object(PackageType), Object(Package), 'hasMany', 
> 'Package', Array, Array, true, Array, 0, Array)
> #6 C:\wamp\www\lib\Cake\Model\Model.php(2653): 
> DboSource->read(Object(PackageType), Array)
> #7 C:\wamp\www\app\Controller\AppController.php(36): Model->find('all')
> #8 C:\wamp\www\lib\Cake\Controller\CakeErrorController.php(71): 
> AppController->beforeRender()
> #9 [internal function]: CakeErrorController->beforeRender(Object(CakeEvent))
> #10 C:\wamp\www\lib\Cake\Event\CakeEventManager.php(246): 
> call_user_func(Array, Object(CakeEvent))
> #11 C:\wamp\www\lib\Cake\Controller\Controller.php(924): 
> CakeEventManager->dispatch(Object(CakeEvent))
> #12 C:\wamp\www\lib\Cake\Error\ExceptionRenderer.php(285): 
> Controller->render('error500')
> #13 C:\wamp\www\lib\Cake\Error\ExceptionRenderer.php(267): 
> ExceptionRenderer->_outputMessageSafe('error500')
> #14 C:\wamp\www\lib\Cake\Error\ExceptionRenderer.php(252): 
> ExceptionRenderer->_outputMessage('pdo_error')
> #15 [internal function]: ExceptionRenderer->pdoError(Object(PDOException))
> #16 C:\wamp\www\lib\Cake\Error\ExceptionRenderer.php(165): 
> call_user_func_array(Array, Array)
> #17 C:\wamp\www\lib\Cake\Error\ErrorHandler.php(127): 
> ExceptionRenderer->render()
> #18 [internal function]: ErrorHandler::handleException(Object(PDOException))
> #19 {main} [*CORE\Cake\Error\ErrorHandler.php*, line *136*]
>
>

-- 
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to