I’m having troubles understanding how relationships are managed by LO base, specifically fk constraints “on delete”.
Database is a simple three table test: book - author and bookauthors connecting the many to many relation between the two.
For example I’d like the fk bookauthors.authorid changed if the master author.authorid changes - ON UPDATE CASCADE radio button in LO relationships dialog does that and works as I expected as well as does setting it with ‘mysql’ command.
In ‘mysql’ I can set ON DELETE NO ACTION but that is not reflected in LO relationships dialog - the ON DELETE CASCADE radio button is now active.
Further if activating NO ACTION radio button in LO and then checking in ‘mysql’ with ‘show create table bookauthors;’ the ON DELETE NO ACTION is gone, eh…
Setting ON DELETE CASCADE in LO dialog has the desired effect, if after that changed to NO ACTION the ON DELETE CASCADE is erased leaving the ON UPDATE… alone (when checked in ‘mysql’).
I understand that NO ACTION is the default in mariadb but it is somewhat odd to find that LO deletes a definition that is already set and to me somewhat bewildering that LO shows ON DELETE CASCADE active when relations dialog is reopened…
I’m no database guru so my questions: what am I missing, is this the correct behaviour or what errors did I do. ?
LO 7.3.5.2
MariaDB 10.5.16