think-orm
think-orm copied to clipboard
Think ORM——the PHP Database&ORM Framework
Psr\Log\LoggerInterface 没有定义LEVEL:sql 所以setlog报错。 level:sql不是psr定义level,希望orm组件能遵循psr定义。或者orm处理好兼容问题。
https://github.com/top-think/think-orm/blob/97b061b47616301ff29fbd4c35ed9184e1162e4e/src/model/concern/Attribute.php#L318 例如,字符串首位有 0 或 空格,与任何值都是相等的,造成数据无法正常更新, 是否可以改成 绝对等于或 ` strcmp($a, $b) !== 0 ` 这种类似的强类型比较。
``` if (empty($config['dsn'])) { $config['dsn'] = 'mongodb://' . ($config['username'] ? "{$config['username']}" : '') . ($config['password'] ? ":{$config['password']}@" : '') . $config['hostname'] . ($config['hostport'] ? ":{$config['hostport']}" : '') } ``` 需要改为:...
# 原因 pg_attrdef.adsrc在pg版本大于10后已经被取消了,这个字段不存在了。 # 解决办法 将pgsql.sql的61行: ``` pg_attrdef.adsrc AS fields_default, ``` 更换为: ``` pg_get_expr(pg_attrdef.adbin, pg_attrdef.adrelid) AS fields_default, ```
create_time 字段保存的是时间戳,当 create_time = 0 时,同时也不想转 datetime 格式,这个时候需要直接拿到 int 类型的数据,而不是 null 类型
由于目前Oracle官方对 PDO_OCI 的驱动扩展更新还是停留在 2005-11-26 的 PDO_OCI-1.0.tgz 在很多场景下,调用Oracle数据库性能与功能都已过时。(如Oracle存储过程获取出参根本不能获取到) https://pecl.php.net/package/pdo_oci 这个是php的PDO_OCI扩展下在地址  而目前Oracle 官方一直任在更新的则是 oci 驱动扩展。 oci8-3.0.1.tgz 如今已更新到了 3.0.1的版本,是去年年底(2020-12-21)持续更新的驱动扩展 https://pecl.php.net/package/oci8  强烈建议thinkphp官方 ORM针对 Oracle数据库做oci的适配。
Uncaught think\db\exception\PDOException: SQLSTATE[42703]: Undefined column: 7 ERROR: column pg_attrdef.adsrc does not exist LINE 10: pg_attrdef.adsrc AS fields_default, ^ QUERY: SELECT pg_attribute.attname AS fields_name, pg_attribute.attnum AS fields_index, pgsql_type(pg_type.typname::varchar) AS fields_type, pg_attribute.atttypmod-4...
使用withJion连表查询,希望主表某个字段不要查询,再使用withoutField,会报错,因为withoutField设置的field没有表名。 不使用withoutField时: ``` SELECT `system_admin`.`id`, `system_admin`.`auth_id`, `system_admin`.`head_img`, `system_admin`.`username`, `system_admin`.`password`, `system_admin`.`phone`, `system_admin`.`remark`, `system_admin`.`login_num`, `system_admin`.`sort`, `system_admin`.`status`, `system_admin`.`create_time`, `system_admin`.`update_time`, `system_admin`.`delete_time`, `system_admin`.`nickname`, `system_admin`.`email`, `system_admin`.`wechat_official_account_openid`, `system_admin`.`notifications_setting`, `system_admin`.`uid`, `systemAuth`.`id` AS `systemAuth__id`, `systemAuth`.`title` AS `systemAuth__title` FROM `ea_system_admin`...