first take at has_relationship_loaded
Alexander Hartmaier [Fri, 16 Mar 2012 13:25:10 +0000 (14:25 +0100)]
lib/DBIx/Class/Row.pm

index 2cc5739..12e9b5f 100644 (file)
@@ -714,7 +714,7 @@ sub has_relationship_loaded {
   $self->throw_exception( "has_relationship_loaded needs a relationship name" )
     unless defined $rel;
 
-  return 0;
+  return exists $self->{related_resultsets}->{$rel};
 }
 
 =head2 get_columns