[Dbix-class] No such column: me. error
Christopher H. Laco
claco at chrislaco.com
Tue Nov 22 19:28:35 CET 2005
Matt S Trout wrote:
> On Tue, Nov 22, 2005 at 01:20:21PM -0500, Christopher H. Laco wrote:
>> Matt S Trout wrote:
>>> On Tue, Nov 22, 2005 at 12:23:48PM -0500, Christopher H. Laco wrote:
>>>> I'm stumped on this. I'm working through the Handel test suite and I'm
>>>> getting this error on a write activity:
>>>>
>>>> Where is the "me" in me.sku coming from?
>>> Storage adds it - if you export DBIX_CLASS_STORAGE_DBI_DEBUG=1 (or set
>>> $class->storage->debug(1) ) you'll be able to see the full SQL statement.
>>> Storage always aliases the current able to 'me' currently in order to
>>> distinguish it from joins and prefetches.
>>>
>> Fixed. Stupid user trick [as usual].... __PACKAGE__->add_columns instead
>> of $self->add_columns in my DBI class... eeek...can't wait to factor
>> that out...
>>
>> I think the only thing left is deep recursion issues since I have my own
>> new() subs...once I NEXTalize that, I think I'm in the clear.
>
> Yeah, please bear in mind that in the C3 branch this will ideally want to
> be $self->next::method(...) rather than $self->NEXT::new(...)
>
I'm not sure NEXT will do it...but NEXT is deep magic for my brain...
Handel::Cart::new
I check the data has and options, then I call insert() in the CDBI world...
In DBIC world, I get deep recursion obviously...
This works, but it's evil:
> if ($caller =~ /^DBIx::Class/) {
> return $self->SUPER::new();
> };
What's the correct way to get myself out of this mess without breaking
my API [for now]...
-------------- 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/ef1af1f1/smime.bin
More information about the Dbix-class
mailing list