lerni/silverstripe3-mysql57-fluent
Composer 安装命令:
composer require lerni/silverstripe3-mysql57-fluent
包简介
A patch for SilverStripe to mimic the MySQL-Mode ANSI as with MySQL <5.7.x
关键字:
README 文档
README
Requirements
- SilverStripe >3.6 <4
Installation
Use composer:
composer require lerni/silverstripe3-mysql57-fluent
Background
This fix is for SS 3.x only with SS 4 you sould update fluent to 4.1 or use a config as sunnysideup has in his module to fix the same issue on 4.x https://github.com/sunnysideup/silverstripe-mysql-5-7-fix
framework sets MySQL-Mode on every DB-request to ANSI-Mode https://github.com/silverstripe/silverstripe-framework/blob/3/model/connect/MySQLDatabase.php#L45
As per MySQL 5.7 ANSI-Mode includs also ONLY_FULL_GROUP_BY and not only:
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-combo
With the ONLY_FULL_GROUP_BY sorting a DataObject by a fluent translated field throws an error like:
[User Error] Uncaught SS_DatabaseException: Couldn't run query: SELECT DISTINCT ... this is incompatible with DISTINCT
This module patches MySQLDatabase.php to prevent the error above.
统计信息
- 总下载量: 11.06k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2018-08-23