Re: [CDBI] Scope of autoupdate/update?

[prev] [thread] [next] [Date index for 2005/08/02]

From: William Ross
Subject: Re: [CDBI] Scope of autoupdate/update?
Date: 20:42 on 02 Aug 2005
On 2 Aug 2005, at 20:54, Christopher H. Laco wrote:

> Christopher H. Laco wrote:
>
>
>> I think it should be possible to create a custom HAS_A  
>> relationship class that automatically flips the autoupdate bit  
>> based on the parents autoupdate bit, but that of course assumes  
>> that autoupdate is scoped correctly.
>>
>
> So, with that said, what's the best way to disable the autoupdate  
> for all instances returned by a has_a relationship without actually  
> cycling through each result before passing it along?

Custom inflation method?

   Handel::Cart->has_a(thing => 'My::Artist',
     inflate => 'inflate_without_autoupdate',
   );

and in your base class, something like:

   sub inflate_without_autoupdate {
     my ($class, $id) = @_;
     my $self = $class->_simple_bless($id);
     $self->autoupdate(0);
     return $self;
   }

but I haven't ever needed to do this, nor tested any of the above :)

will


_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] Scope of autoupdate/update?
Christopher H. Laco 19:36 on 02 Aug 2005

Re: [CDBI] Scope of autoupdate/update?
Christopher H. Laco 19:54 on 02 Aug 2005

Re: [CDBI] Scope of autoupdate/update?
William Ross 20:42 on 02 Aug 2005

Re: [CDBI] Scope of autoupdate/update?
Christopher H. Laco 20:48 on 02 Aug 2005

Re: [CDBI] Scope of autoupdate/update?
Christopher H. Laco 23:49 on 08 Aug 2005

Generated at 09:40 on 09 Aug 2005 by mariachi v0.52