query failed Unknown column 'c.id' in 'where clause'