top-think / top-think/think-orm
能否完善下:关联统计方法兼容别名
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 437
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
能否完善关联统计相关方法兼容主表有别名的情况(无需独立语句查询):
- 当使用
hasWhere时,会给主表加上别名(简单类名) - 而
withCount或withSum等方法则使用完整表名去比对检测
(topthink/think-orm v2.0.61 think orm)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the hasWhere, withCount, and withSum implementations in the ORM association query code, then reproduce the behavior described for a main table alias on think-orm v2.0.61. Done means association statistics recognize the alias consistently without requiring an independent query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100