[Dbix-class] bad result source? cryptic error message

Benjamin Hitz hitz at genome.stanford.edu
Thu Apr 9 23:39:54 GMT 2009


So, I have a result source (table class) made from an Oracle  
Materialized View.
When I try to use it (rather, anything in the schema)M I get the  
following error message:

fasolt 215 > perl -I ../../ -MDB::Mod -e '$s=DB::Mod->schema'
DBIx::Class::Schema::throw_exception(): DB/Mod/Interaction_mv.pm did  
not return a true value at (eval 716) line 3.

The odd part is that it works if I just :
__PACKAGE__->add_columns(qw /interaction_no feature_a feature_b gene_a  
gene_b headline experiment_type term_name action source url  
annotation_type notes phenotype dbxref_id pubmed citation/);

But fails if I use the new version of the DBIx::Class::Schema::Loader  
which creates
__PACKAGE__->add_columns(
   "interaction_no",
   { data_type => "NUMBER", default_value => undef, is_nullable => 0,  
size => 10 },
   "feature_a",
   {
     data_type => "VARCHAR2",
     default_value => undef,
     is_nullable => 1,
     size => 40,
   },
   ...

for all columns.  Note that they are ALL nullable, and there is no  
primary key (it's a view).

Can someone help me track down what this exception is...


For completeness...
===
Package DB::Mod;

use strict;
use warnings;

use Config::DB;
use base 'DBIx::Class::Schema';

__PACKAGE__->load_classes;
(some irrelevant connection stuff)
========


--
Ben Hitz
Senior Scientific Programmer
Saccharomyces Genome Project
Stanford University
hitz at genome.stanford.edu






More information about the DBIx-Class mailing list