aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/InterfaceModel/Reflector/DBIC.pm
diff options
context:
space:
mode:
authormatthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-02-07 08:52:49 +0000
committermatthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-02-07 08:52:49 +0000
commita945c8a0dce9badd5dd743795da28f7fce2a74a7 (patch)
treecf99ea1ea35b784bf5043fc909c11cad0a0a465e /lib/Reaction/InterfaceModel/Reflector/DBIC.pm
parentc964124fa8604d7bbb7cebbd7d8f96fefc6446fe (diff)
downloadreaction-a945c8a0dce9badd5dd743795da28f7fce2a74a7.tar.gz
reaction-a945c8a0dce9badd5dd743795da28f7fce2a74a7.zip
pass _parent to collections
Diffstat (limited to 'lib/Reaction/InterfaceModel/Reflector/DBIC.pm')
-rw-r--r--lib/Reaction/InterfaceModel/Reflector/DBIC.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Reaction/InterfaceModel/Reflector/DBIC.pm b/lib/Reaction/InterfaceModel/Reflector/DBIC.pm
index e986785..67747cf 100644
--- a/lib/Reaction/InterfaceModel/Reflector/DBIC.pm
+++ b/lib/Reaction/InterfaceModel/Reflector/DBIC.pm
@@ -333,7 +333,11 @@ class DBIC, which {
domain_model => $dm_name,
orig_attr_name => $source,
default => sub {
- $collection->new(_source_resultset => shift->$dm_name->resultset($source));
+ my $self = $_[0];
+ return $collection->new(
+ _source_resultset => $self->$dm_name->resultset($source),
+ _parent => $self,
+ );
},
);