[Koha-bugs] [Bug 21610] Koha::Object->store needs to handle incorrect values

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 23 15:43:09 CEST 2018


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

--- Comment #25 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Tomás Cohen Arazi from comment #24)
> What about things like this:
> 
> https://metacpan.org/release/DBIx-Class-Validation

If I understand the goal of this module correctly it's exactly what I am trying
to avoid: 1 validation per field. The idea is to provide a generic way to
validate data. I am sure we will have exceptions, but we will handle them
separately.

> Also, it feels DBIX::Class should have some way to tell 'use the default
> when undef is passed'. I'm searching.

Think "0" vs undef vs "", and also update (not only insert)
How do you undef an existing value?

It is why DBIx::Class takes the default value if the parameter is not passed,
and it is what this patch is trying to achieve. It is already what we did for
Koha::Patron, nothing new here :)

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


More information about the Koha-bugs mailing list