Thanks, it works. But it don't work when I use it with HABTM. I have three tables ------------ users | groups | groups_users ------------
The habtm code in the model Group, looks like this ------------ public $hasAndBelongsToMany = array ( 'User' => array ( 'className' => 'User', 'join_table' => 'groups_user', 'with' => 'GroupsUser', 'foreignKey' => 'group_id', 'associationForeignKey' => 'user_id', 'fields' => array ( 'CONCAT(User.firstname,\' \',User.lastname) AS full_name' ) ) ); ------------ then I use this in the controller to get the result ------------ $this->set('GroupUsers', $this->find('all')); ------------ / Christher On Mar 21, 10:46 pm, mscdex <msc...@gmail.com> wrote: > On Mar 21, 3:51 pm, Chrillemeter <i...@christher.se> wrote: > > > Hello! > > > I got a problem with $this->Model->find() and sql-functions such as > > CONCAT. > > This is a known problem and it happens when using any SQL functions. > Teknoid has a solution for this issue > here:http://teknoid.wordpress.com/2008/09/29/dealing-with-calculated-field... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~----------~----~----~----~------~----~------~--~---