Question: I am buidling an app in CakePHP. I have 2 models:
- Project
- User

The Project model has various belongsTo relations to the user model, one for the creator, one for the last editor and one for the manager. This works fine.

Then I add a virtual field to the User model, called 'name', which is CONCAT(first\_name, ' ', last\_name). It combines the first name and last name into a general name field, which is used througout the app.

After this, I get SQL errors saying that the first\_name column is ambiguous. This is because in the query, the alias for Creator, Manager, etc is not used in the CONCAT field.

Any ideas on how to avoid this?

Answer: 
I found the solution: <http://book.cakephp.org/view/1632/Virtual-fields-and-model-aliases>
Try specifying what table the first\_name column is from. Something like this:

```
CONCAT(table1.first_name,'',table1.last_name) 

```