0

i´m looking for a way to store entered values ​from a belongsToMany relationship. What I intend to do. The main entry takes place under "assessments". Mapped into socialskills in this example.

So there is also a corresponding table and also the "socialskills_assessments" table.

Now different categories are created under socialskills. I also receive these at assessments. For this I have created a table which represents the existing values ​​from "socialskills".

echo '<table>';
foreach ($technicalskills as $technicalskill):
    echo '<tr>';
    echo '<td>'. $technicalskill. '</ td>';
    echo '<td>'. $this->Form->control(VALUE-FIELD-FROM-socialskills_assessments).'</ td>';
    echo '</tr>';
endforeach;
echo '</table>';

Now, I'd like to put the value "Communication", which is created at socialskills, a school grade "VALUE-FIELD-FROM-socialskills_assessments". So whether the person in the social behavior "communication" is good or bad. So I added now in the table "socialskills_assessments" the point "value".

How can I now store the value entered in it? Or am I on the wrong way?

I would be very thankful for help.

  • I'm not sure if I get you right: You want to store an additional value in your join table `socialskills_assessments`? If thats right take a look at https://book.cakephp.org/3.0/en/orm/saving-data.html#saving-belongstomany-associations – floriank Feb 04 '19 at 12:56
  • 1
    I think @burzum meant to link to [this](https://book.cakephp.org/3.0/en/orm/saving-data.html#saving-additional-data-to-the-join-table). – Greg Schmidt Feb 04 '19 at 17:48
  • Yes. ;) Thanks @GregSchmidt – floriank Feb 04 '19 at 19:26

0 Answers0