top-think / top-think/think-orm
4.0.24 自动时间戳字段取出并没有进行转换
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 437
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
同一个 ThinkPHP 8项目 ,同样的代码,ORM 3.x 取出的时间戳字段会自动转换 4.x 不会还是原始数据,写入没问题。
Config 和 模型类均已配置
protected function getOptions(): array
{
return [
'autoWriteTimestamp' => true,
'createTime' => 'created_at',
'updateTime' => 'updated_at',
'deleteTime' => 'deleted_at',
];
}
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 reported ThinkPHP 8 behavior with the model and Config timestamp options shown in the issue, comparing timestamp retrieval in ORM 3.x and 4.x. Identify the relevant retrieval path and determine the expected converted value; done means retrieved timestamp fields are converted in 4.x while writes continue to work.
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