How to search a single field of 3 tables with JOIN using Respect \ Relational?

0

I'm starting to use the Respect\Relational framework and I was just trying to fetch the names of the letter templates that belong to the id 1 business line, but all the forms I've tried always return all the columns. What would be the correct way to do this using the Respect\Relational framework?

This is the image of the required part of the bank:

  

These were some attempts that did not work either:

$this->mapper->letterTemplatesNames = Filtered::by('name')->letter_templates();

$this->mapper->hiddenLetterTemplatesBusinessLines = 
      Filtered::letter_templates_business_lines();

$response = $this->mapper->letter_templates
      ->letter_templates_business_lines
      ->business_lines[(int) $value]
      ->fetchAll(Sql::orderBy('letter_templates.name')
      ->asc()
      ->limit($limit));

$response = $this->mapper->letter_templates
      ->letter_templates_business_lines(
          array('business_lines_id' => (int) $value))
      ->fetchAll(Sql::orderBy('letter_templates.name')
      ->asc()
      ->limit($limit));

$response = $this->mapper->letterTemplatesNames
      ->letter_templates_business_lines
      ->business_lines[(int) $value]
      ->fetchAll(Sql::orderBy('letter_templates.name')
      ->asc()
      ->limit($limit));

$response = $this->mapper
      ->hiddenLetterTemplatesBusinessLines(
        array('business_lines_id' => (int) $value))
      ->letterTemplatesNames
      ->fetchAll(Sql::orderBy('letter_templates.name')
      ->asc()
      ->limit($limit));
    
asked by anonymous 10.11.2016 / 20:50

0 answers