projects
/
dbsrgits/DBIx-Class-ParameterizedJoinHack.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
throw error when doing parameterized join twice on same relation
[dbsrgits/DBIx-Class-ParameterizedJoinHack.git]
/
lib
/
DBIx
/
Class
/
ResultSet
/
ParameterizedJoinHack.pm
diff --git
a/lib/DBIx/Class/ResultSet/ParameterizedJoinHack.pm
b/lib/DBIx/Class/ResultSet/ParameterizedJoinHack.pm
index
25c7483
..
53a04b0
100644
(file)
--- a/
lib/DBIx/Class/ResultSet/ParameterizedJoinHack.pm
+++ b/
lib/DBIx/Class/ResultSet/ParameterizedJoinHack.pm
@@
-23,6
+23,9
@@
sub with_parameterized_join {
unless $params_ref eq 'HASH';
}
+ die "Parameterized join can only be used once per relation"
+ if exists(($self->{attrs}{join_parameters} || {})->{$rel});
+
$self->search_rs(
{},
{ join => $rel,