X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FHasOne.pm;h=665d13190b02c91a47e4d2b8d470301865e3891a;hb=e5053694;hp=3141259fd18ad758ec17514b14b57da1815bdde4;hpb=514b84f6b60b566d75d2ff2ddd08659c4cf7b427;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship/HasOne.pm b/lib/DBIx/Class/Relationship/HasOne.pm index 3141259..665d131 100644 --- a/lib/DBIx/Class/Relationship/HasOne.pm +++ b/lib/DBIx/Class/Relationship/HasOne.pm @@ -98,8 +98,8 @@ sub _validate_has_one_condition { my $key = $1; $class->throw_exception("Defining rel on ${class} that includes '$key' but no such column defined here yet") - unless $class->has_column($key); - my $column_info = $class->column_info($key); + unless $class->result_source_instance->has_column($key); + my $column_info = $class->result_source_instance->column_info($key); if ( $column_info->{is_nullable} ) { carp(qq'"might_have/has_one" must not be on columns with is_nullable set to true ($class/$key). This might indicate an incorrect use of those relationship helpers instead of belongs_to.'); }