[CDBI] Weird things with has_a and lazy population

Phil Mitchell phil at 2people.org
Thu Nov 17 20:17:25 GMT 2005


>
> > here is DBI->trace:
> ....
>  T  <- prepare_cached('SELECT id FROM my_domains WHERE  id = ?
> ')= ( DBIx::ContextualFetch::st=HASH(0x8426a7c) ) [1 items] at DBI.pm
> line 391

There appears to be a problem with the way your columns are specified.
This SELECT statement is only retrieving your 'id' col. I've never
used set_up_table -- maybe the postgres version has some gotchas...
why not just set your columns explicitly with
__PACKAGE__->columns(...) and then you'll have a better idea what CDBI
is seeing...

>  T  <- FETCH('Active')= '' at DBI.pm line 1124
>  T  <- FETCH('Taint')= 1 at ContextualFetch.pm line 49
>     <- STORE('Taint' 0)= 1 at ContextualFetch.pm line 50
>     <- execute(46)= 1 at ContextualFetch.pm line 51
>  T  <- STORE('Taint' 1)= 1 at ContextualFetch.pm line 52
>  T  <- FETCH('NAME_lc')= [ 'id' ] at DBI.pm line 1125
>  T  <- bind_columns(SCALAR(0x84709f8))= 1 at DBI.pm line 1125
>  T  <- fetchrow_arrayref= [ '46' ] row1 at ContextualFetch.pm line 59
>  T  <- fetchrow_arrayref= undef row1 at ContextualFetch.pm line 59
>     <- disconnect_all= '' at DBI.pm line 677
> !T  <- DESTROY(DBIx::ContextualFetch::st=HASH(8426a7c))= undef during global des...
>
> --
> Dmitry <df2 at wm.ru>
>
>
> _______________________________________________
> ClassDBI mailing list
> ClassDBI at lists.digitalcraftsmen.net
> http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
>


--
==========================
2People Blog: http://2-people.blogspot.com/
2People site: http://www.2people.org




More information about the ClassDBI mailing list