[Dbix-class] DynamicSubclass and Preview: conflict?

luke saunders luke.saunders at gmail.com
Fri May 7 16:39:45 GMT 2010


On Fri, May 7, 2010 at 10:40 AM, luke saunders <luke.saunders at gmail.com> wrote:
>> This *is* working:
>> my $schema = MyApp::Schema->compose_namespace('MyApp')->connect(@dsn);
>>
>> This is *not* working:
>> my $schema = MyApp::Schema->connect(@dsn);
>>
>> In that case it crashes with:
>> DBIx::Class::ResultSet::new_result(): No such column deleted on
>> MyApp::Schema::Items at ...
>>
>> Does anyone know why? If you need the code i can provide it.
>
> I'm responsible for ::Preview so I'll take what you have and make a
> failing .t from it against the ::Preview test suit, then I'll figure
> out what's happening and how best to fix it. If you don't mind sending
> the code then send it to me (offlist) as it may help.

The test case you sent me offlist is now fixed in svn. That test case
doesn't mention DynamicSubclass but I presume that it's the same
problem. Can you check the latest revision from svn* and confirm if
the original issue is also fixed?

Essentially the reason it worked with ->compose_namespace is that it
properly sets up the result class for the previewed source, which the
::Preview code didn't do on its own.

* http://dev.catalyst.perl.org/repos/bast/DBIx-Class-Preview



More information about the DBIx-Class mailing list