-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TranslationWalker CAST change not supported by mysql #1024
Comments
Thank you, for report. As I see in MySQL documentation here: http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html#function_cast and if I googled right this is a long ongoing bug in MySQL http://bugs.mysql.com/bug.php?id=34564 ( :'( ) |
yeah but what u basically say is that translatable extension will no longer support mysql because of your change or because mysql its just bugged... |
@Venzon I m trying to find a suitable solution to fix this issue |
@birko thank you <3 |
@l3pp4rd
@birko
this merge breaks code in my app
0fcdd24#commitcomment-5776813
i just updated doctrine extensions and query which worked fine now gets me mysql error
SELECT s0_.id AS id0, s0_.specialization_id AS specialization_id1, s0_.location_id AS location_id2, s0_.clinic_id AS clinic_id3, CAST(t1_.content AS LONGTEXT) AS content4, s0_.active AS active5, s0_.has_comments AS has_comments6, s0_.specialization_id AS specialization_id7, s0_.doctor_spec_id AS doctor_spec_id8, s0_.location_id AS location_id9, s0_.clinic_id AS clinic_id10 FROM seo_article s0_ LEFT JOIN seo_article_translations t1_ ON t1_.locale = 'pl' AND t1_.field = 'content' AND t1_.object_id = s0_.id WHERE s0_.location_id = 1 AND s0_.specialization_id = 1 AND s0_.active = 1 ORDER BY s0_.id DESC LIMIT 1
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LONGTEXT) AS content4, s0_.active AS active5, s0_.has_comments AS has_comments6,' at line 1
seems that cast part makes issues
Mysql Server version: 5.6.14-1+debphp.org~precise+1 - (Ubuntu)
I am using hint for translation query
$query->setHint( \Gedmo\Translatable\TranslatableListener::HINT_TRANSLATABLE_LOCALE, 'pl');
$query->setHint(\Doctrine\ORM\Query::HINT_CUSTOM_OUTPUT_WALKER, 'Gedmo\Translatable\Query\TreeWalker\TranslationWalker');
$query->setHint(\Gedmo\Translatable\TranslatableListener::HINT_FALLBACK, 0);
The text was updated successfully, but these errors were encountered: