utf8_bin vs. utf_unicode_ci

后端 未结 3 970
执笔经年
执笔经年 2020-12-03 00:26

My table Website

Website_Name//column name
Google
Facebook
Twitter
Orkut
Frype
Skype
Yahoo
Wikipedia

I i use utf8_bin collation then my que

3条回答
  •  孤城傲影
    2020-12-03 01:07

    I was using 'utf8_unicode_ci' which is default by doctrine , i had to change it to :

     * @ORM\Table(name = "Table", options={"collate"="utf8_bin"})
    

    Since some of my composite primary keys consisted of text fields. Sadly 'utf8_unicode_ci' resolved "poistný" and "poistny" as same primary key value and ended with crash at doctrine inserting flush. I could not simply change collation of one part of composite primary key, had to drop table and recreate. Hope it saves time to someone else..

提交回复
热议问题