Remove Class::Data::Inheritable and use CAG 'inherited' style accessors
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / ColumnCase.pm
index d6db87b..56bef61 100644 (file)
@@ -4,6 +4,8 @@ package # hide from PAUSE
 use strict;
 use warnings;
 
+use base 'DBIx::Class';
+
 sub _register_column_group {
   my ($class, $group, @cols) = @_;
   return $class->next::method($group => map lc, @cols);
@@ -16,18 +18,24 @@ sub add_columns {
 
 sub has_a {
     my($self, $col, @rest) = @_;
-    
+
     $self->_declare_has_a(lc $col, @rest);
     $self->_mk_inflated_column_accessor($col);
-    
+
     return 1;
 }
 
 sub has_many {
   my ($class, $rel, $f_class, $f_key, @rest) = @_;
-  return $class->next::method($rel, $f_class, ( ref($f_key) ?
-                                                          $f_key :
-                                                          lc($f_key) ), @rest);
+  return $class->next::method(
+    $rel,
+    $f_class,
+    (ref($f_key) ?
+      $f_key :
+      lc($f_key||'')
+    ),
+    @rest
+  );
 }
 
 sub get_inflated_column {