[Dbix-class] RFC: DBIx::Class 0.05 Schemas + Catalyst?

Alan Humphrey alan.humphrey at comcast.net
Tue Jan 31 18:55:48 CET 2006


Note that this allows you to
have multiple $c->model('Foo'), $c->model('Bar'), etc, which use the
same Schema-class but different connection information.

> I'm doing that today.  I connect to a MySQL database and a SQL Server
database using the same schema.  Other than getting the schema definition
out of the Catalyst directory structure I don't see what the new approach
gets me.

The big problem with the approach I used to make this, is that all
access from within controllers turns into the idiom:

$c->model('MyDB')->schema->resultset('Foo')->search(...).

> That is really ugly.  If it's a choice between that and "use lib
'/path/to/catalyst/app/lib'" to let my non-catalyst apps use the schema/db
I'll take the latter.

- Alan





More information about the Dbix-class mailing list