ソースを参照

Do not forget the target table column types

Walther Lalk 9 年 前
コミット
17f9d1380d
1 ファイル変更2 行追加1 行削除
  1. 2 1
      src/ORM/Association/BelongsToMany.php

+ 2 - 1
src/ORM/Association/BelongsToMany.php

@@ -1272,7 +1272,8 @@ class BelongsToMany extends Association
         $query
             ->where($this->junctionConditions())
             ->select($joinFields)
-            ->defaultTypes($types);
+            ->defaultTypes($types)
+            ->addDefaultTypes($this->target());
 
         $query
             ->eagerLoader()