[Dbix-class] single table inheritence
Matt S Trout
dbix-class at trout.me.uk
Tue Oct 18 16:04:31 CEST 2005
On Tue, Oct 18, 2005 at 11:21:39AM +0100, Richard Jolly wrote:
> Hi,
>
> I need to set up single table inheritence, where row objects are
> reblessed into a subclass based on the contents of column.
>
> I think, in Class::DBI terms, I'd do this with a select trigger to
> rebless the objects.
>
> I don't see a select trigger in DBIx::Class, but it looks like the
> constructor at DBIx::Class::Row::new would be the right place.
Yes, definitely. I threw up some prototype code a while back that worked
like that, although inevitably I now can't find it.
If you can think of a good general interface for this I'd be very much
interested; RFCs to the list welcome, with or without code.
--
Matt S Trout Specialists in perl consulting, web development, and
Technical Director UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list