[Dbix-class] Re: Result, ResultSet and load_namespaces

Alejandro Imass aimass at yabarana.com
Thu Jul 26 18:30:44 GMT 2012


On Thu, Jul 26, 2012 at 2:09 PM, Bill Moseley <moseley at hank.org> wrote:
> On Thu, Jul 26, 2012 at 6:59 AM, Alejandro Imass <aimass at yabarana.com>
> wrote:
>>
>>
>>
>> So now I ask:
>>
>> The elegant way to extend row-level methods is by extending the code
>> in the Result classes below the checksum created by Loader?
>
>
> We had the need to share row methods between somewhat different schemas and
> used Moose Roles to accomplish that.   So, that might be an approach to
> consider.
>

Yep, definitively an option!

-- 
Alejandro Imass

> We also don't use Loader (other than initially).  That's something to
> evaluate as your schema grows.
>

Our iterative process is something like:

export data -> change dia -> dia2code -> ddl -> recreate db ->
recreate dbic model -> load data

So basically we can change the DB quiet frequently and we have a
detailed change log on the schema so it's realtive easy to re-create
and populate a fresh new db every time we iterate a new version.

The advantage of this approach (to us) is that the UML class diagram
is always the latest DB model and the result source classes are
disposable, that's why we want to keep the custom model code separate
from the auto-generated classes.

Thanks!

-- 
Alejandro Imass

>
> --
> Bill Moseley
> moseley at hank.org
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
> http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk



More information about the DBIx-Class mailing list