[Dbix-class] Configuration query - Catalyst::Model::DBIC::Schema
Dermot
paikkos at googlemail.com
Fri Aug 1 15:01:36 BST 2008
2008/7/31 Matt S Trout <dbix-class at trout.me.uk>:
> On Wed, Jul 30, 2008 at 03:50:40PM +0100, Dermot wrote:
>> 2008/7/30 Matt S Trout <dbix-class at trout.me.uk>:
>> > On Tue, Jul 29, 2008 at 09:15:42AM +0100, Dermot wrote:
>> >> 2008/7/28 Matt S Trout <dbix-class at trout.me.uk>:
> That's completely wrong. That's still a no-op.
>
> I told you how it works. Please actually try that.
>
Then there is something else wrong. I reverted back to
<Model::MyAppDB>
connect_info dbi::SQLite:__HOME__/data.db
</Mode::MyAppDBl>
With my DBIC::Schema configured as
package MyApp::Model::MyAppDB;
use strict;
use base 'Catalyst::Model::DBIC::Schema';
__PACKAGE__->config(
schema_class => 'MyApp::Schema::MyAppDB',
connect_info => [
"dbi:SQLite:/path/to/my/data.db",
],
);
It errors with
"MyApp::Model::MyAppDB", "Cannot load schema class 'Model::MyAppDB'
However if I have my conf file with
<MyApp::Model::MyAppDB>
schema_class Model::MotionDB
connect_info dbi:SQLite:data.db
</MyApp::Model::MyAppDB>
I can also do this with my Model::DBIC::Schema
__PACKAGE__->config(
# schema_class => 'MyApp::Schema::MyAppDB',
# connect_info => [
# "dbi:SQLite:/path/to/my/data.db",
# ],
);
And it all works.
Isn't that how it was designed to work?
Dp.
More information about the DBIx-Class
mailing list