Blog

Unknown relation alias Translation in Symfony

29 de septiembre de 2011Web

Apparently everything was correct in my model, and it had been working smoothly so far. But suddenly the error "Unknown relation alias Translation" showed up.

After some research I found a very good explanation of the issue. The fix doesn't seem to be trivial, but after some more research I realized the problem indeed was trivial. In fact, I don't remember having wasted so long with such a stupid error.

I used the Symfony CRUD generator, and, when generating the code, it calls tables this way: Doctrine_Core::getTable('customer')->method()It always uses lowercase for the table names, but my model's name is actually "Customer". The lowercase mode seems to work in some cases, but it fails when there is a Translation relation.

Hope it helps.

Lo último en el blog


Síguenos en Twitter

Mossaica.es | TEL: 626 113 668 | Email: info@mossaica.es