Skip Menu |

This queue is for tickets about the Catalyst-Plugin-AutoCRUD CPAN distribution.

Report information
The Basics
Id: 46207
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-AutoCRUD

People
Owner: OLIVER [...] cpan.org
Requestors: tuco [...] pasteur.fr
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.44
Fixed in: (no value)



Subject: Support for 'accessor' needed
Hi, I just installed C::P::AutoCRUD with my Catalyst Application 5.804. It just works like a charm to display tables available in your schema plugged with DBIx::Class. However, I get an error thrown by Catalyst while attempting to display values from a table 'Organism'. In the definition of my table, I created 'accessor' to access column as (from DBname::Organism): .... "shortspecies", { data_type => "varchar", default_value => undef, is_nullable => 0, size => 32, accessor => "shortname", }, ... Then when pointing to localhost:3000/autocrud/dbname/organism the display is empty and I get this error from Catalyst : [Tue May 19 10:19:09 2009] [error] Caught exception in BiblioList::Controller::AutoCRUD::AJAX->list "Can't locate object method "shortspecies" via package "BiblioList::Model::BiblioListDB::Organism" at /usr/local/share/perl/5.10.0/Catalyst/Plugin/AutoCRUD/Controller/AJAX.pm line 161. It looks like accessor is not check while attempting to display certain columns data. I tested with another table without 'accessor' and it works fine. Could you add this support? Anyway thanks for this great tool!!! :) Regards Emmanuel
Hi Emmanuel, On Tue May 19 04:35:09 2009, horkko wrote: Show quoted text
> I just installed C::P::AutoCRUD with my Catalyst Application 5.804. > It just works like a charm to display tables available in your schema > plugged with DBIx::Class.
Thanks, that's good to hear :-) Show quoted text
> However, I get an error thrown by Catalyst while attempting to display > values from a table 'Organism'. In the definition of my table, I > created 'accessor' to access column as (from DBname::Organism):
I've had a look at this issue, and I agree it would be nice to support the "accessor" option in the ResultSource. Unfortunately the patch would not be simple, because the column name is used in many places, so I'll have to be really careful. I do want to get this fixed though, so I wanted to let you know I am working on it. Thanks for the feedback and bug report, regards, oliver.
On Tue May 19 04:35:09 2009, horkko wrote: Show quoted text
> However, I get an error thrown by Catalyst while attempting to display > values from a table 'Organism'. In the definition of my table, I created > 'accessor' to access column as (from DBname::Organism):
Thanks for reporting this bug. I've included a fix for it in a new release of Catalyst::Plugin::AutoCRUD, version 0.47, which is now on CPAN. Please let me know if you have any further issues. regards, oliver.