]> _ Git - cubist_cms-back.git/commitdiff
#2810
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 12 Jun 2019 14:47:29 +0000 (16:47 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 12 Jun 2019 14:47:29 +0000 (16:47 +0200)
src/app/Magic/Fields/Model.php

index 33cef15467244592d1ae07d986f5c224b6508b5b..2b231b40a2de4d1f50865811e8fd7aa67b1fbcc4 100644 (file)
@@ -31,4 +31,12 @@ class Model extends Field
 
         return $modelClass::all()->pluck($this->getAttribute('attribute'), $inst->getPrimaryKey())->toArray();
     }
+
+    public function getDatabaseType()
+    {
+        if ($this->getAttribute('allows_multiple')) {
+            return 'text';
+        }
+        return parent::getDatabaseType();
+    }
 }