Am 16.07.2010 um 10:18 schrieb Benjamin Martin:

> Hello everyone,
> 
> I have a ResultSet where I have used the 'resultset_attributes' to restrict 
> which records get returned from search etc. ... ala the documentation:
> 
>  __PACKAGE__->resultset_attributes({ where => { deleted => undef } });
> 
> In one part of the system I would like to access these restricted records but 
> I can't seem to get it to work!
> 
>  $schema->resultset('TableA')->search( {}, { where => undef } );

Try

$schema->resultset('TableA')->search( {}, { where => { deleted => { '!=' => 
undef } } } );

which will result in a WHERE "deleted" IS NOT NULL;


cheers,
mo
_______________________________________________
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/dbix-class@lists.scsys.co.uk

Reply via email to