Yes, it does create a foreign key in the component table.
In the field name 'component_id', you must understand 'Parent Id'.
Yes, a component can have many children components, but a child component must have only one parent component. The link is not set in the parent component, but in all children components.
$parentComponent = R::dispense('component');
$childComponent1 = R::dispense('component');
$childComponent2 = R::dispense('component');
$parentComponent->name='I am the parent!';$childComponent1->name='I am the first child!';
$childComponent2->name='I am the second child!';
$parentComponent->ownComponentList[] = $childComponent1;
$parentComponent->ownComponentList[] = $childComponent2;
R::store($parentComponent);
If the table does not exist, this will create it with 3 records:
+----+--------------------------+--------------+
| id | name | component_id |
+----+--------------------------+--------------+
| 1 | I am the parent! | (null) |
| 2 | I am the first child! | 1 |
| 3 | I am the second child! | 1 |
+----+--------------------------+--------------+
If you now load the parent component, you can retrieve its children :
$p = R::load('component', 1);
echo $p->name;
foreach($p->ownComponentList as $c) {
echo $c->name;