Class::DBI::Plugin::AbstractCount

[prev] [thread] [next] [Date index for 2005/02/23]

From: Dave Howorth
Subject: Class::DBI::Plugin::AbstractCount
Date: 12:10 on 23 Feb 2005
I just tried to use Class::DBI::Plugin::AbstractCount in place of 
Class::DBI::Plugin::CountSearch for compatibility with another plugin. 
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 the column is called relationship_id, whilst the accessor is called 
relationship. 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. Have I missed something?

Cheers, Dave

Class::DBI::Plugin::AbstractCount
Dave Howorth 12:10 on 23 Feb 2005

Generated at 22:43 on 24 Feb 2005 by mariachi v0.52