[Dbix-class] Multiple Tables - One Class
Matt S Trout
dbix-class at trout.me.uk
Tue May 12 18:35:05 GMT 2009
On Tue, May 12, 2009 at 10:39:16AM +0800, Lee Standen wrote:
> Hi All,
> Has anyone seen a modification to DBIC which will handle multiple tables
> per class?
You don't need a modification. Just create a result source object per table
on the fly and register them as using the same class.
> A requirement has just come up out of the blue for the project I'm working
> on which requires the data to be segmented into daily tables.
The extra thing to do would be to create one source that unions all the
tables together - given 08100 you can do this as a virtual view on the
DBIC side if you have to, but your database can probably do something better
Of course, you haven't explained -why- you have this requirement or what
it's supposed to achieve, so it's rather difficult to provide concrete
Matt S Trout Catalyst and DBIx::Class consultancy with a clue
Technical Director and a commit bit: http://shadowcat.co.uk/catalyst/
Shadowcat Systems Limited
mst (@) shadowcat.co.uk http://shadowcat.co.uk/blog/matt-s-trout/
More information about the DBIx-Class