SELECT
DISTINCT "Organisation"."ClassName",
"Organisation"."LastEdited",
"Organisation"."Created",
CASE WHEN "Organisation_Localised_sl_SI"."ID" IS NOT NULL THEN "Organisation_Localised_sl_SI"."Title" ELSE "Organisation"."Title" END AS "Title",
"Organisation"."TypeID",
"Organisation"."ID",
CASE WHEN "Organisation"."ClassName" IS NOT NULL THEN "Organisation"."ClassName" ELSE 'Innovatif\\DataObjects\\Organisation' END AS "RecordClassName",
'sl_SI' AS "Locale",
CASE WHEN "Organisation_Localised_sl_SI"."ID" IS NOT NULL THEN 'sl_SI' ELSE NULL END AS "SourceLocale", "type_OrganisationType"."Title" AS "_SortColumn0"
FROM "Organisation"
LEFT JOIN "OrganisationType" AS "type_OrganisationType" ON "type_OrganisationType"."ID" = "Organisation"."TypeID"
LEFT JOIN "Organisation_Localised" AS "Organisation_Localised_sl_SI" ON "Organisation"."ID" = "Organisation_Localised_sl_SI"."RecordID" AND "Organisation_Localised_sl_SI"."Locale" = ?
ORDER BY "_SortColumn0" ASC
LIMIT 30
Tested in CMS on GridFieldSortableHeader with the same result if I try simple test on front-end:
Test with two classes Organisation and OrganisationType.
YAML config:
SQL after I try to sort summary field:
Tested in CMS on GridFieldSortableHeader with the same result if I try simple test on front-end:
I get results:
Tested with Fluent 4.5.0 and 5.0.0 beta3 and got the same result.
Fluent sorts records in base table and not in translation table as it should.