I want to make a query on an automatic generated table under Doctrine 1.2. In this particular case I have the following query:
SELECT F.id FROM ficha as F JOIN ficha_has_tema FT ON FT.ficha_id = F.id WHERE FT.tema_id = ? GROUP BY F.id HAVING COUNT(F.id) > 1
But I get the error:
Uncaught exception 'Doctrine_Exception' with message 'Couldn't find class ficha_has_tema' in...
So, is there a way to make this query using doctrine without creating the class ficha_has_tema? I need to do the COUNT.
Thanks!