YAML producer should only give field names from indices
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer / YAML.pm
index 782ddb1..e419ddd 100644 (file)
@@ -173,7 +173,7 @@ sub view_index {
     return {
         'name'      => scalar $index->name,
         'type'      => scalar $index->type,
-        'fields'    => scalar $index->fields,
+        'fields'    => [ map { ref($_) ? $_->name : $_ } $index->fields ],
         'options'   => scalar $index->options,
         keys %{$index->extra} ? ('extra' => { $index->extra } ) : (),
     };