gabordemooij/redbean — Issue #97: redbean doesn't create more than one foreign key in the same table
Author: marinobresciani
Created: 2011-10-23 19:09:33+00:00
State: open

$pear = R::dispense("pear");
R::store($pear);
$apple = R::dispense("apple");
R::store($apple);
$banana = R::dispense("banana");
R::store($banana);

$fruitsalad = R::dispense("fruitsalad");

$fruitsalad->pear = $pear;
$fruitsalad->apple = $apple;
$fruitsalad->banana = $banana;
R::store($fruitsalad);

... seems to generate a foreign key only for macedonia.pear_id --> pear.id