[Dbix-class] No such column: me. error

Christopher H. Laco claco at chrislaco.com
Tue Nov 22 18:23:48 CET 2005


I'm stumped on this. I'm working through the Handel test suite and I'm
getting this error on a write activity:

> t/cart_add................................ok 5/44DBD::SQLite::db prepare failed: no such column: me.sku(1) at dbdimp.c l
> ine 268 at C:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 226.
> Can't call method "execute" on an undefined value at C:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 177.
> # Looks like you planned 44 tests but only ran 5.
> # Looks like your test died just after 5.

Here's my cart/item classes:

>     use base 'Handel::DBI';
> __PACKAGE__->table('cart');
> __PACKAGE__->iterator_class('Handel::Iterator');
> __PACKAGE__->columns(All => qw(id shopper type name description));
> __PACKAGE__->set_primary_key(qw/id/);
> __PACKAGE__->has_many(_items => 'Handel::Cart::Item', {'foreign.cart' => 'self.id'});

and

>     use base 'Handel::DBI';
> __PACKAGE__->table('cart_items');
> __PACKAGE__->autoupdate(1);
> __PACKAGE__->iterator_class('Handel::Iterator');
> __PACKAGE__->columns(All => qw(id cart sku quantity price description));
> __PACKAGE__->set_primary_key(qw/id/);
> __PACKAGE__->inflate_column(price => {inflate => 'Handel::Currency'});


Where is the "me" in me.sku coming from?

-=Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3178 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20051122/e9810b37/smime.bin


More information about the Dbix-class mailing list