From 2c19eba39c78c6d22ccfffec8018e366fb382de3 Mon Sep 17 00:00:00 2001 From: Dan Jones Date: Fri, 19 Nov 2021 10:26:50 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Ensure=20getModelStub=20and=20sa?= =?UTF-8?q?veMeta=20work=20when=20metaTable=20isn't=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Kodeine/Metable/Metable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Kodeine/Metable/Metable.php b/src/Kodeine/Metable/Metable.php index 1416211..50c70fa 100644 --- a/src/Kodeine/Metable/Metable.php +++ b/src/Kodeine/Metable/Metable.php @@ -213,7 +213,7 @@ protected function getModelStub() // get new meta model instance $classname = $this->getMetaClass(); $model = new $classname; - $model->setTable($this->metaTable); + $model->setTable($this->getMetaTable()); // model fill with attributes. if (func_num_args() > 0) { @@ -226,7 +226,7 @@ protected function getModelStub() protected function saveMeta() { foreach ($this->metaData as $meta) { - $meta->setTable($this->metaTable); + $meta->setTable($this->getMetaTable()); if ($meta->isMarkedForDeletion()) { $meta->delete();