[CDBI] Weird things with has_a and lazy population [SOLVED]

Dmitry df2 at wm.ru
Thu Nov 17 10:04:42 GMT 2005


On Thu, 17 Nov 2005 11:26:09 +0300
Dmitry <df2 at wm.ru> wrote:
> 
> > > 
> > > then it just prints empty strings
> > 
> > That's obviously broken, and you don't even have a has_a() on name().
> > Forget the lazy-loading, has_a(), etc. and just figure out why name() is
> > returning nothing when that row in the database has a value.
> 
> Now i tried to make test more clear, without columns(Essential, but
> still cant figure out what wrong:
> 
> > DBI Class:
> package ClientApp::Domain;
> use strict;                                                            
> use base qw/Catalyst::Base ClientApp:DB/;
> __PACKAGE__->set_up_table('my_domains')
> __PACKAGE__->has_a(plan => 'ClientApp::Plan');                                                     
> 1;
> 

Just found a showstopper here:
use base qw/Catalyst::Base ClientApp:DB/;
if write instead:
use base qw/ClientApp:DB/;
or
use base qw/ClientApp:DB Catalyst::Base/;
the everything works fine. 
Now i know that Catalyst::Base played a joke with me. Thanks for
response.



-- 
Dmitry <df2 at wm.ru>





More information about the ClassDBI mailing list