]> _ Git - cubist_cms-back.git/commitdiff
#2810
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 3 Jun 2019 14:27:59 +0000 (16:27 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 3 Jun 2019 14:27:59 +0000 (16:27 +0200)
src/app/Magic/Models/CubistMagicAbstractModel.php

index a24e9d6014878455aca4a86f6e737fdac1d1009c..68719c1c6d41b4dd83c4b2bb7eafd4e8db4f8671 100644 (file)
@@ -226,7 +226,7 @@ class CubistMagicAbstractModel extends Model
 
 
         foreach ($this->_relationships as $relationship) {
-            if ($relationship->getRelationship() === 'belongsToMany') {
+            if ($relationship->getRelationship() == 'belongsToMany') {
 
                 $model = self::_toModel($relationship->getAttribute('model'));
 
@@ -240,7 +240,7 @@ class CubistMagicAbstractModel extends Model
         }
 
         foreach ($this->_fields as $field) {
-            if ($field->getRelationship() == 'belongsToMany') {
+            if ($field->getRelationship() != 'belongsToMany') {
                 $field->defineDbColumn($table);
             }
         }