-
Notifications
You must be signed in to change notification settings - Fork 183
Open
Description
// 模型定义
use think\Model;
class TestData extends Model
{
protected function init(): void
{
$this->setOption('connection', 'data');
$this->setOption('table', 'TestData_');
}
}// 模型使用
public function test()
{
$testData = new TestData();
$testData = $testData->setSuffix('1');
// $testData->getTable(); 输出的是 TestData_ 而不是 TestData_1
}数据库用的 MongoDB
think-orm 版本 v4.0.50
Metadata
Metadata
Assignees
Labels
No labels