[Koha-bugs] [Bug 21203] ILS-DI - GetRecords crashes on non-existent records

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 13 19:39:07 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203

--- Comment #3 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Martin Renvoize from comment #2)
> QA Comment: Can we 100% guarantee that there is always 1 and only 1
> biblioitem attached to a biblio object?
> 
> Looking at the dbic schema it appears there's no db level constraint for
> this (it's a has_many relationship), looking a level up in the Koha::Biblio
> object it appears we do indeed fire a ->find rather than using the
> underlying dbic relationship, which suggests there's only 1 (or 0)
> biblioitem attached to a biblio but there's no test to confirm we actually
> get a biblioitem object back.
> 
> I'd love to see the underlying db constraints added, but would accept a
> second check that the biblioitem exists before calling unblessed upon it.
> 
> Perhaps I'm being over cautious?

I do not think this is valid, biblio and biblioitem must be considered 1-1, we
discussed it several times on the mailing lists.
Both tables must be merged, but it's a huge work.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list