model associations causing errors.

2006-06-30 Thread Luke
Alright... I just set up a hasOne and a belongsTo for my users and articles tables, and now I am getting this error: SQL Error in model Article: 1052: Column 'active' in where clause is ambiguous Here are my findAll calls: $this-set('articles', $this-Article-findAll('active =

Re: model associations causing errors.

2006-06-30 Thread AD7six
Hi Luke, set debug to 2 in your /app/config/core.php file, and you will see that the sql query that is generated, and see that there are 2 tables included in the SQL that contain the field active. Cheers, AD7six --~--~-~--~~~---~--~~ You received this message

Re: model associations causing errors.

2006-06-30 Thread Samuel DeVore
Try using array('Article.active'=1) for the condition ('Article.active'=1 would work as well but there are some advantages to using the arrays for conditions)On 6/30/06, AD7six [EMAIL PROTECTED] wrote: Hi Luke,set debug to 2 in your /app/config/core.php file, and you will see thatthe sql query