[Dbix-class] Combining link tables

Jason Thaxter thaxter at gomoos.org
Tue Oct 31 16:39:17 GMT 2006


That cookbook example is cool.

I have two databases for two applications. One takes the schema from the 
first, then uses table inheritance to add some columns. I'd like to inherit 
everything, into a full second set of proxy classes, e.g. App2::Schema 
inherits from App1::Schema, then just add extra ->add_column bits for my 
extra inherited table.

I thought that the reliance on __PACKAGE__ should make this a snap, but I'm 
having some issues. I'm going to start by checking out the cookbook example 
and seeing where I differ from it.

Any tips on this - ? Methods in particular I'd need to override? new? 
inflate_result?


On Tuesday 31 October 2006 06:53, Ash Berlin wrote:
> > 2) If not, can it be implemented with relationships, or would I need to
> > write custom accessors or use a custom resultset class to get the
> > desired behaviour?
>
> Tho just to show how great DBIx::Class is, I'll tell you how to do it
> anyway: See "Dynamic Sub-classing DBIx::Class proxy classes" in
> DBIx::Class::Manual::Cookbook
>
> Ash
>
> _______________________________________________




More information about the DBIx-Class mailing list