Cakephp, i18n, SQL Error, Not unique table/alias

Posted by ion on Stack Overflow See other posts from Stack Overflow or by ion
Published on 2010-03-22T12:16:45Z Indexed on 2010/03/22 12:21 UTC
Read the original article Hit count: 146

Filed under:
|
|

I get the following SQL error:

SQL Error: 1066: Not unique table/alias: 'I18n__name'

when doing a simple find query.

Any ideas on possible situations that may have caused this?? I'm using a bindModel method to retrieve the data is that related?

This is my code:

$this->Project->bindModel(array(
                                        'hasOne' => array(
                                        'ProjectsCategories',
                                        'FilterCategory' => array(
                                                                'className' => 'Category',
                                                                'foreignKey' => false,
                                                                'conditions' => array('FilterCategory.id = ProjectsCategories.category_id')
                                                                ))));
$prlist = $this->Project->find('all', array(
                                                    'fields' => array('DISTINCT slug','name'),
                                                    'conditions' => array('FilterCategory.slug !='=>'uncategorised')
                                                    ))

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about i18n