InnoDB Foreign Keys

32 views
Skip to first unread message

Stephan Krauss

unread,
May 21, 2016, 11:46:04 AM5/21/16
to redbeanphp
Hello !


I'm a beginner for redbean.
I have test a simple script.


$stephan = R::dispense('user');
$stephan->name = 'Max';
$stephan->vorname = 'Mustermann';

$stephan_mail = R::dispense('emails');
$stephan_mail->mail = 'in...@bla.de';

$stephan->ownEmail[] = $stephan_mail;

$stephan_mail_reserve = R::dispense('emails');
$stephan_mail_reserve->mail = 'in...@blub.de';

$stephan->ownEmail[] = $stephan_mail_reserve;

$id = R::store($stephan);

When the script is finished i see 2 tables.
The foreign key 'On update' and 'On delete' is 'set null'.
Is there a way to set 'cascade' ?

Sorry for my bad english ?

Your sincerly

Stephan


Reply all
Reply to author
Forward
0 new messages