X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSource.pm;h=f3d67927950a81ffc163d09349248d133cbcc300;hb=27252a4a98791c2fcf13693cfbb9f8c44f5e585b;hp=84c8df9c66d5079b4b01a9a14ed35c7b69f2eb49;hpb=68f3b0dd9e91421b02c818ca42543b79bc197dfd;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 84c8df9..f3d6792 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -961,11 +961,16 @@ sub resolve_prefetch { if (my ($fail) = grep { @{[$_ =~ m/\./g]} == $dots } keys %{$collapse}) { my ($last) = ($fail =~ /([^\.]+)$/); - $self->throw_exception( - "Can't prefetch multiple has_many rels ${last} and ${pre}" - .(length($as_prefix) ? "at the same level (${as_prefix})" - : "at top level" - )); + carp ( + "Prefetching multiple has_many rels ${last} and ${pre} " + .(length($as_prefix) + ? "at the same level (${as_prefix}) " + : "at top level " + ) + . 'will currently disrupt both the functionality of $rs->count(), ' + . 'and the amount of objects retrievable via $rs->next(). ' + . 'Use at your own risk.' + ); } #my @col = map { (/^self\.(.+)$/ ? ("${as_prefix}.$1") : ()); } # values %{$rel_info->{cond}};