On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote: > I have a loader that loads a class > > My::DB::GMain > > associated with table g_main and seems to load My::DB::GMain::Manager. > However, when I make this call: > > my @gmain = My::DB::GMain::Manager->get_gmains(query=>[gene_id=>672]); > > I get: > > Can't locate object method "get_gmains" via package "My::DB::GMain::Manager" > at rdbo.loader.test.pl line 35. > > From my reading of the docs, that should be the method name, I thought. > However, it appears that I am wrong. Any suggestions?
The default convention manager expects table names to be plural, and uses the table name as the default plural base_name for manager methods. So my guess is that the method is really named get_gmain(), not get_gmains(). (I keep meaning to add docs to summarize the default conventions, rather than having them spread throughout the extensive convention manager POD.) To get a better idea of what's going on when using the loader, try the technique shown in the loader section of the tutorial that will print all the classes the loader makes for you. @classes = $loader->make_classes(...); foreach my $class (@classes) { if($class->isa('Rose::DB::Object')) { print $class->meta->perl_class_definition, "\n"; } else # Rose::DB::Object::Manager subclasses { print $class->perl_class_definition, "\n"; } } -John ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object