think-orm icon indicating copy to clipboard operation
think-orm copied to clipboard

Think ORM——the PHP Database&ORM Framework

Results 251 think-orm issues
Sort by recently updated
recently updated
newest added

mongodb 完善聚会统计 可以一次完成多个 sum / avg 等统计 增加 count 计数统计 multiAggregate(array $aggregate, array $groupBy): array $aggregate 聚合指令, 可以聚合多个参数, 如 ['as1' => ['sum','field1'], 'as1' =>  ['sum','field2'], 'as3' =>  ['avg','field2'], 'count' => ...

这个地方驼峰为什么转下划线 生成的SQL有问题 一对一关联 一对多关联`hasWhere()`方法都没有转下划线 ![image](https://user-images.githubusercontent.com/37658940/119117779-2aa2c500-ba5c-11eb-944e-aa3d39ef808f.png) ```sql SELECT `UserOrder`.*, `user_order`.* FROM `tb_user_order` `UserOrder` INNER JOIN `tb_order_status` `OrderStatus` ON `UserOrder`.`ID` = `OrderStatus`.`ID` INNER JOIN `tb_place_order_assign_manager` ON `tb_place_order_assign_manager`.`ORDER_ID` = `user_order`.`ID` JOIN `tb_manager_user` ON...

相对比现在的```__construct``` 加```__toString```组合灵活一些。

这是异常情况 ![image](https://user-images.githubusercontent.com/67722651/117530922-64aea880-b012-11eb-8702-d9f123cef921.png) ![image](https://user-images.githubusercontent.com/67722651/117530961-a2133600-b012-11eb-9c94-a3ad7d201c32.png)

src/db/Mongo.php ![image](https://user-images.githubusercontent.com/57987232/115708640-d6e08580-a3a2-11eb-874c-3aa2a1e54ffa.png) src/db/builder/Mongo.php ![image](https://user-images.githubusercontent.com/57987232/115708792-01324300-a3a3-11eb-9312-326e1220eb36.png)

MongoDb

BaseQuery.php类内,public function field($field) 和 public function withoutField($field) 这两个方法,分别在各自的倒数第三行加一句unset($field[0]); 剔除 * 星号。 WTF!!!!!!!!!!!!!!!!!!!! ps: 倒数第三行 if (isset($this->options['field'])) { $field = array_merge((array) $this->options['field'], $field); } unset($field[0]); $this->options['field'] = array_unique($field); return $this; 另外:...

Event->trigger will return an array of result, but the query result should be a single result, using $once param fix that.

例如在group模型下定义好 关联 public function user(): \think\model\relation\BelongsToMany { return $this->belongsToMany(User::class, GroupAccess::class)->orderRaw('CONVERT(name USING gbk)'); } self::with('user')->select(). 关联数据只有最后一条被查询到

PHPSTORM 2019.2 ,thinkphp6.0.7 我该如何让他们有提示? Db::table()->where()->find(); table那一步是没有提示的

extra方法没有定义导致IDE报Warning