On Fri, Oct 17, 2008 at 4:17 PM, Yves Räber <[EMAIL PROTECTED]> wrote:
> And That's the piece of code that I'm trying to make work :
>
> my $extensions = $c->model('MyApp::Batch')->search(
> {
>  state => ['STOPPED', 'ARCHIVED', 'DONE']
> }
> )->search_related('script')->search_related('astextensions');
>
> Now if I try $extensions->delete , this is what I get (I have to admit I
> don't really understand why I get this):

I'm not a DBIC guru by any means, but I ran into a situation like this
recently where all the chained calls weren't being followed and the
solution was to run all methods (search->search->search in my case) in
a single call. Maybe try:
...->search_related('script')->search_related('astextensions')->delete;

Drew
-- 
----------------------------------------------------------------
 Drew Taylor                 *  Web development & consulting
 Email: [EMAIL PROTECTED]  *  Site implementation & hosting
 Web  : www.drewtaylor.com   *  perl/mod_perl/DBI/mysql/postgres
 ----------------------------------------------------------------

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to