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

--- Comment #8 from Tomás Cohen Arazi <tomasco...@gmail.com> ---
Marcel, I thought a bit more about this and...

(In reply to Marcel de Rooy from comment #3)
> Great, Tomas.
> 
> Few remarks:
> I would rather remove the id column. We c/should take care of that in the
> code.
> Like:
> my @pk = $schema->source('Borrower')->primary_columns;
> Note that we theoretically can have multiple columns. (We don't have such
> Koha objects, but iirc we have one or two tables like that.)

I fixed it so the id is retrieved from the source. I did it so multi-pk works
as expected, and changed the tests so they use a multi key sample Koha::Object.

> Similarly, it would be more consistent and less confusing to use the
> singular form. We do so in build; I would expect the same for build_object.
> Additionally, you return just one singular object.

I decided not to do it, but instead enforce the idea that plurals should be
used. I even changed the wiki about this. Because singular vs. plural leads
(everywhere) to circular deps (boo). And so we need to ONLY include plurals
everywhere. The plural already loads the singular, so it will always be
available. This should be explained more bradly, but I think we should leave
the plural here to simplify things.

I hope you agree and we move this forward, as it will make writing tests more
seamless.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to