[Koha-bugs] [Bug 10636] New: patronimage should have borrowernumber as PK, not cardnumber
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Jul 24 02:30:50 CEST 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10636
Bug ID: 10636
Summary: patronimage should have borrowernumber as PK, not
cardnumber
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Database
Assignee: gmcharlt at gmail.com
Reporter: gmcharlt at gmail.com
QA Contact: testopia at bugs.koha-community.org
The patronimage table currently has cardnumber as its primary key rather than
borrowernumber. patronimage.cardnumber in turn has a FK constraint referencing
borrowers.cardnumber.
This is less than ideal for a couple reasons:
[1] DBIX::Class (see bug 8798) complains about it. In particular, any code
that loads Koha::Database would litter the Apache logs with the following:
DBIx::Class::Carp::__ANON__(): "might_have/has_one" must not be on columns with
is_nullable set to true (Koha::Schema::Result::Borrower/cardnumber). This might
indicate an incorrect use of those relationship helpers instead of belongs_to.
at /usr/share/perl5/DBIx/Class/Relationship/HasOne.pm line 96
[2] Every other table that has an FK to borrowers uses borrowernumber as the
referent.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list