[Koha-bugs] [Bug 8798] Add the use of DBIx::Class

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Sep 22 08:58:15 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8798

--- Comment #25 from wajasu <matted-34813 at mypacks.net> ---
Better news.
I got my fresh debian VM built.  Here are may latest observations:

In the VM:
koha at biblio:~/kohaclone/local/lib/perl5/DBIx$ grep VER *
Class.pm:$VERSION = '0.08200';
So my other VM must have been older (a month, and maybe grabbed an older
version).

koha at biblio:~/kohaclone$ prove t/Context.t 
t/Context.t .. DBIx::Class::Relationship::HasOne::might_have():
"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
/home/koha/kohaclone/Koha/Schema/Result/Borrower.pm line 780
t/Context.t .. ok   
All tests successful.
Files=1, Tests=1,  2 wallclock secs ( 0.04 usr  0.00 sys +  0.78 cusr  0.07
csys =  0.89 CPU)
Result: PASS

(Just guessed that you want DateTime when inflating. You might have not.)
[Maybe you can note the exact dbicdump command line you used in the bug report,
for future reference.  I know they might want Versioned, but I know you have
started tweaks, probably for cardnumber in borrower.]
koha at biblio:~$ dbicdump -o dump_directory=./lib -o
components='["InflateColumn::DateTime"]' -o debug=1 Koha::Schema
'DBI:mysql:database=koha;host=localhost' koha koha
Dumping manual schema for Koha::Schema to directory ./lib ...
Schema dump completed.

I got ActionLogs.pm in my dump in this debian VM.

koha at biblio:~/kohaclone$ prove t/Context.t
t/Context.t .. DBIx::Class::Relationship::HasOne::might_have():
"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
/home/koha/kohaclone/Koha/Schema/Result/Borrower.pm line 780
t/Context.t .. ok   
All tests successful.
Files=1, Tests=1,  1 wallclock secs ( 0.03 usr  0.00 sys +  0.80 cusr  0.04
csys =  0.87 CPU)
Result: PASS

I also tested to see if DBIx tries to connect to the DB, by shutting down the
mysql instance, and it made no difference.

So you might want to get rid of the Borrower/cardnumber  thing above.

We can't have this spitting out junk everytime we use the context. Note: It
does so for "perl Makefile.PL" or any thing that uses C4::Context.

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


More information about the Koha-bugs mailing list