[Catalyst] [DBIx::Class::ResultSet ] not equal in where clause

2010-03-11 Thread David
Hi,

is not possible to set 'not equal' using ResultSet search method? I can't make 
it with 'search_literal' method because I need to use a join clause too.
I would like to do something like:

$c-model('DB::Test')-search({-and = [ 'me.name' = 'name', -not = { 
'users.id' = 'id'}]},
{ join = 'users' });


 David



  ___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] [DBIx::Class::ResultSet ] not equal in where clause

2010-03-11 Thread Octavian Rasnita
From: David 
  Hi,

  is not possible to set 'not equal' using ResultSet search method? I can't 
make it with 'search_literal' method because I need to use a join clause too.
  I would like to do something like:

  $c-model('DB::Test')-search({-and = [ 'me.name' = 'name', -not = { 
'users.id' = 'id'}]},
  { join = 'users' });

  If you want to use -and, you can skip it. If you'll want to use the same 
table/column in 2 expressions you can add it back.

  Try something like:

  $c-model('DB::Test')-search({
'me.name' = 'name',
'users.id' = {'!=' = 'id'},
  },{
join = 'users',
  });

  Octavian



__ Information from ESET NOD32 Antivirus, version of virus signature 
database 4933 (20100310) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/