Unknown column 'typeId' in 'where clause'