0
I’m starting to use the framework Respect\Relational and I was just trying to get the names of the chart templates that belong to the id 1 business line, but all the forms I tried always returns all the columns. What would be the right way to do this using the framework Respect\Relational?
This is the image of the necessary bank part:
These were some attempts that also did not work:
$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));

Also put the attempts, the codes!
– novic
Okay, I forgot. Thank you!
– Gustavo B. Costa
it’s best not to work with this
Wrapperdo not consider aMicroOrm(good this is my opinion), has to improve a lot, mainly inJoinsandSelect, use aActiveRecordsorEloquent(is a ORM ofLaravelbut that works out of also). Just remembering what I tried to do, but at the time of choosing the items ofSelectI didn’t find how!– novic
Got it, I’ll be looking at the items you quoted.
Selectan option is to use Filtered::by()– Gustavo B. Costa
*Errata: I get it, I’ll be looking at the items you quoted.
Selectan option is to do through theFiltered::by()which can be used byuse Respect\Data\Collections\Filtered;, in the codes posted there is an example of this use.– Gustavo B. Costa