[Dbix-class] RE: Re: Question about dynamic class generation (DBIx::Class::Schema::Loader) (Brandon Black)

Leandro Hermida leandro.hermida at unibas.ch
Tue Feb 7 17:26:27 CET 2006


Brandon Black wrote:
> Well, Schema::Loader is very new, I wouldn't really trust it until at 
> least 0.02.  At the same time, much of the code is either directly from 
> or mechanically translated from DBIx::Class::Loader.  But all of that 
> aside, Schema::Loader is probably not want you want in the long run in 
> a big app with a big/complex database schema (in development or production

> - just in general).  It's purpose is to get people up and running quickly 
> against an existing database that wasn't built with DBIx::Class in mind, 
> or is created/managed by other tools at the time.

> Unless your app/db is fairly simplistic, you will probably want to
> migrate off of Schema::Loader after a while, and you'd do that by using 
> the DBIx::Class SQLT support to dump the Schema::Loader-generated Schema
> out to a manual definition that you can edit and refine from there.

> The SQLT support that Matt mentioned (generating CREATE TABLE stuff from
> a DBIx::Class::Schema) goes in the opposite direction of Schema::Loader, 
> and should be the more robust and preferred solution that matches up more 
> with the others you mentioned.

Oh, I thought DBIx::Class::Loader was mean't to tackle this need.  For large
database models one really needs the ORM classes generated automatically.
Do you think there is interest in developing functionality for automating
the generation of the DBIx::Class::Schema class files?  I think this is a
good concept especially for really large database models where you want the
ORM system to just give you the abstraction and not have to create/maintain
potentially hundreds of files.

Sincerely,

Leandro Hermida





More information about the Dbix-class mailing list