Docs for has_many where clause

edited March 2016 in Share
Small issue - this line in the docs is one closing parenthesis short!
public $has_many = array('attributes' => array('model' => array(FUEL_FOLDER => 'fuel_tags_model', 'where' => 'category_id = 1'));

http://docs.getfuelcms.com/general/models#relationships

Comments

  • edited March 2016
    More importantly, that advice doesn't seem to filter in practice.

    I would expect the left hand side of the tags combo field to show only the category_id's specified - this doesn't seem to happen.
  • edited 5:36AM
    Try this:
    public $has_many = array('attributes' => array(FUEL_FOLDER => 'fuel_tags_model', 'where' => 'category_id = 1'));
  • edited 5:36AM
    That's perfect! Thank you.
Sign In or Register to comment.