top-think / top-think/think-orm

withCount报错

Open
#832 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
437
Forks
188
PR merge metrics
No merged PRs in 30d

Description

当有withJoin后
withCount的关联关系中会使用表名 而不是 name 导致sql语句错误

think-orm版本4.0.50
thinkphp版本8.1.3
php版本8.3
如有疑问可联系本人 微信 : 13324477281 QQ : 497161114 只限官方用于bug复现 不接受答疑解惑及有偿解决等

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or reproduction code is named. Start by reproducing the interaction between withJoin and withCount on think-orm 4.0.50, then inspect the generated SQL and the relation-query entry points; done means the association uses the intended name and the SQL executes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.