We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Model service AND on categories

Developer Preview

Reinos's avatar
Reinos
79 posts
7 years ago
Reinos's avatar Reinos

Hi,

I have the following service setup

$model = ee('Model')->get('ChannelEntry')->filter('channel_id', 5);
$model->with('Categories');
$model->filter('Categories.cat_id', 5)->filter('Categories.cat_id', 6);

this gives me zero results. Doing it with an orFilter() then it works. Is it possible to do an AND against multiple category IDs?

let me know.

       
Kevin Cupp's avatar
Kevin Cupp
791 posts
7 years ago
Kevin Cupp's avatar Kevin Cupp

Hi Reinos. No currently you cannot do AND for those to-many relationships.

       
Reinos's avatar
Reinos
79 posts
7 years ago
Reinos's avatar Reinos

Hi Kevin,

Any plans to implement this?

       
Kevin Cupp's avatar
Kevin Cupp
791 posts
7 years ago
Kevin Cupp's avatar Kevin Cupp

Not in the immediate future, too many priorities ahead of it at the moment.

       
Reinos's avatar
Reinos
79 posts
7 years ago
Reinos's avatar Reinos

Thanks and keep up the good work 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.