Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Many-many relationships: Mentor with cyrillic Project


Reply

2 Posts   390 Views

Avatar
WebSpilka

10 November 2012 at 4:43am (Last edited: 10 November 2012 4:44am), Community Member, 79 Posts

I get code from http://doc.silverstripe.org/framework/en/tutorials/5-dataobject-relationship-management
If I use Cyrillic in the title Project page.
Then on Project tab I can't find Project by Page Name and Link it.
I can't create Many-many relationships: Mentor with cyrillic Project

Pages in Latin are no problems.

Avatar
WebSpilka

13 November 2012 at 3:57am Community Member, 79 Posts

If I use "Add Mentor"
in mysql.log i have next :
Working example for Latin characters

5002 Query   SELECT DISTINCT "Mentor"."ClassName", "Mentor"."Created", "Mentor"."LastEdited", "Mentor"."Name", "Mentor"."ID", CASE WHEN "Mentor"."ClassName" IS NOT NULL THEN "Mentor"."ClassName" ELSE 'Mentor' END AS "RecordClassName" FROM "Mentor" WHERE ("Name" LIKE 'tes%') AND ("Mentor"."ID" NOT IN (SELECT DISTINCT "Mentor"."ID" FROM "Mentor" INNER JOIN "Project_Mentors" ON "Project_Mentors"."MentorID" = "Mentor"."ID" WHERE ("Project_Mentors"."ProjectID" = '9'))) ORDER BY "Mentor"."Name" ASC LIMIT 20

Not a working example for the Cyrillic: in admin area I input 'Йод', but mysql try find LIKE '%u0419%u043E%u0434%'

5025 Query   SELECT DISTINCT "Mentor"."ClassName", "Mentor"."Created", "Mentor"."LastEdited", "Mentor"."Name", "Mentor"."ID", CASE WHEN "Mentor"."ClassName" IS NOT NULL THEN "Mentor"."ClassName" ELSE 'Mentor' END AS "RecordClassName" FROM "Mentor" WHERE ("Name" LIKE '%u0419%u043E%u0434%') AND ("Mentor"."ID" NOT IN (SELECT DISTINCT "Mentor"."ID" FROM "Mentor" INNER JOIN "Project_Mentors" ON "Project_Mentors"."MentorID" = "Mentor"."ID" WHERE ("Project_Mentors"."ProjectID" = '9'))) ORDER BY "Mentor"."Name" ASC LIMIT 20

Why mysql wrong gets my Cyrillic characters?