top-think / top-think/think-orm
mysql insert后获取不到主键id
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 437
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
测试代码
修复文件:
- vendor/topthink/think-orm/src/Model.php
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 reproducing the MySQL insert case shown in the issue, then inspect vendor/topthink/think-orm/src/Model.php, vendor/topthink/think-orm/src/db/BaseQuery.php, and vendor/topthink/think-orm/src/db/PDOConnection.php. Compare the inserted record's primary-key result with the expected behavior in the attached test, and consider the issue done when the ID is available after insertion without breaking related ORM behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100