Skip Menu |

This queue is for tickets about the Class-DBI-Plugin-AbstractCount CPAN distribution.

Report information
The Basics
Id: 11698
Status: resolved
Priority: 0/
Queue: Class-DBI-Plugin-AbstractCount

People
Owner: j.-c.zeus [...] web.de
Requestors: dhoworth [...] mrc-lmb.cam.ac.uk
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.03
Fixed in: (no value)



Subject: AbstractCount fails if Class::DBI::accessor_name is used
I just tried to use Class::DBI::Plugin::AbstractCount in place of Class::DBI::Plugin::CountSearch for compatibility with another plugin (Class::DBI::Plugin::Pager). My call was: __PACKAGE__->count_search_where({relationship => $relation}); This failed with the following message: DBD::mysql::st execute failed: Unknown column 'relationship' in 'where clause' [for Statement " SELECT COUNT(*) FROM members WHERE ( relationship = ? ) "] at /usr/local/share/perl/5.6.1/DBIx/ContextualFetch.pm line 51. ... Now my column is called relationship_id, whilst its accessor is called relationship (set using Class::DBI::accessor_name). CountSearch handles this properly, but looking at the AbstractCount source, it doesn't seem to have any knowledge of accessor names vs column names. This seems like a big omission; it's a showstopper for me. Have I missed something? The docs say: "This Class::DBI plugin combines the functionality from Class::DBI::Plugin::CountSearch ..." so if a fix is not possible, perhaps a warning in the docs would be appropriate. Cheers, Dave
Hi, sorry for the late response. I fixed the issue you mentioned in version 0.04 of Class::DBI:: Plugin::AbstractCount.