[Koha-devel] [RFC ver2 4/4] DBIx::Class - Changes to C4::Members to start using DBIx::Class

Paul POULAIN paul.poulain at free.fr
Thu Nov 27 09:12:38 CET 2008


Rick Welykochy a écrit :
> Paul POULAIN wrote:
> If by "user" you are referring to the librarian or Koha user, then
> it is up to the Koha application to intercept and process the above
> error if it does happen and take remedial action, i.e. send an indignant
> email to Koha-dev!
> 
> Given that you *cannot* create invalid FK relationships in the database,
> I don't see how anything could fail using FK constraints. They are a
> Good Thing (tm) and are required to avoid orphaned child records
> amongst many other things.

I know what is a FK done for, Rick (and in fact I'm the author of most 
of the FK in the DB atm ;-) )
What is a shame is that the librarian can enter something, enter "OK", 
and ... see nothing ... the value hasn't be added due to a FK error, and 
nothing on the browser : everything seems OK ! Quite annoying for the 
librarian !

We can't ask the librarian to look in error.log ! So we need to display 
something on the browser, like "Oups, something goes wrong. Ask the Koha 
team and specify the following problem : "FK contraint at xxxxx.pm, line 
YYY, koha version X.XX.XX.XXX" "

Fortunatly, those errors are very uncommon, and I think I've seen them 
occuring only when a part of the DB has been entered through SQL insert 
& not the browser. But we should trap that anyway ! (as we should trap 
any SQL error)


-- 
Paul POULAIN
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
NOUVEAU TELEPHONE : 04 91 81 35 08



More information about the Koha-devel mailing list