X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FCDBICompat%2FHasA.pm;h=30109545341a4deaa85600bc1f4db92dda62df9a;hb=07037f89d4d9bf97c59a2c083de74f669521da47;hp=b6354293f9980186c6027ed210fb531072e86393;hpb=0567538f9dcf59ff0dcf0fe766815b242115ce20;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/CDBICompat/HasA.pm b/lib/DBIx/Class/CDBICompat/HasA.pm index b635429..3010954 100644 --- a/lib/DBIx/Class/CDBICompat/HasA.pm +++ b/lib/DBIx/Class/CDBICompat/HasA.pm @@ -20,10 +20,10 @@ sub has_a { return 1; } my ($pri, $too_many) = keys %{ $f_class->_primaries }; - $self->throw( "has_a only works with a single primary key; ${f_class} has more. try using a has_one relationship instead of Class::DBI compat rels" ) + $self->throw( "has_a only works with a single primary key; ${f_class} has more. try using a belongs_to relationship instead of Class::DBI compat rels" ) if $too_many; - $self->has_one($col, $f_class); + $self->belongs_to($col, $f_class); return 1; }