Re: Pagination with i18n field condition (pagination + translation behavior error)

2013-09-10 Thread aka
Sorry, a little typo in my example:

$conditions = array('OR' => array( 'I18n__title.content LIKE' => 
'%'.$searchKey.'%'));

should be 

$conditions = array('OR' => array( I18n__titleTranslation LIKE' => 
'%'.$searchKey.'%'));


That doesn't change the outcome though.. 


On Tuesday, September 10, 2013 12:30:53 PM UTC+2, aka wrote:
>
> Why is this no working (throws a column not found) :
>
> $conditions = array('OR' => array( 'I18n__title.content LIKE' => 
> '%'.$searchKey.'%'));
>
> $this->paginate = array(
> 'conditions' => $conditions
> );
>
> $results = $this->paginate();
>
> *Error: * SQLSTATE[42S22]: Column not found: 1054 Unknown column 
> 'I18n__title.content' in 'where clause'
>
> While a normal find works fine: 
> $this->MyModel->find('all',  array('conditions' => $conditions));
>
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Pagination with i18n field condition (pagination + translation behavior error)

2013-09-10 Thread aka
Why is this no working (throws a column not found) :

$conditions = array('OR' => array( 'I18n__title.content LIKE' => 
'%'.$searchKey.'%'));

$this->paginate = array(
'conditions' => $conditions
);

$results = $this->paginate();

*Error: * SQLSTATE[42S22]: Column not found: 1054 Unknown column 
'I18n__title.content' in 'where clause'

While a normal find works fine: 
$this->MyModel->find('all',  array('conditions' => $conditions));



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.