top-think / top-think/think-orm
模型使用suffix设置后缀时,后缀为0会设置无效
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 437
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
模型使用suffix方法设置表后缀时,如果后缀为0,会设置失败。
getSuffix方法获取表后缀时,会把0当空值处理
public function getSuffix(): string
{
return $this->suffix ?: '';
}
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
Search the ORM codebase for getSuffix() and the suffix setter, then trace how the table suffix is stored and read. Verify that a suffix of 0 remains valid rather than being treated as empty, and run the relevant existing ORM tests or add coverage for the zero-suffix case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100