Christophe Coevoet 14 年 前
コミット
db76291251
1 ファイル変更3 行追加3 行削除
  1. 3 3
      lib/Gedmo/Tree/Mapping/Driver/Yaml.php

+ 3 - 3
lib/Gedmo/Tree/Mapping/Driver/Yaml.php

@@ -70,10 +70,10 @@ class Yaml extends File implements Driver
             $classMapping = $mapping['gedmo'];
             if (isset($classMapping['tree']['type'])) {
                 $strategy = $classMapping['tree']['type'];
-                if (!in_array($annot->type, $this->strategies)) {
-                    throw new InvalidMappingException("Tree type: {$annot->type} is not available.");
+                if (!in_array($strategy, $this->strategies)) {
+                    throw new InvalidMappingException("Tree type: $strategy is not available.");
                 }
-                $config['strategy'] = $annot->type;
+                $config['strategy'] = $strategy;
             }
         }
         if (isset($mapping['fields'])) {