]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Model/CDBI.pm
Only stringify by the "name" column if there is one!
[maypole.git] / lib / Maypole / Model / CDBI.pm
index b2e592973fa875c2b33ca60d23913335d647d636..74653dc6f2d091a4a3638713d8e5c2bfce397def 100644 (file)
@@ -65,7 +65,9 @@ sub delete :Exported {
 sub adopt {
     my ($self, $child) = @_;
     $child->autoupdate(1);
-    $child->columns( Stringify => qw/ name / );
+    if (grep { $_ eq "name" } $child->columns) { # Common case
+        $child->columns( Stringify => qw/ name / );
+    } # Otherwise, work it out for yourself.
 }
 
 sub search :Exported {