[Dbix-class] "table" methods in schemas?
Matt S Trout
dbix-class at trout.me.uk
Wed Feb 1 17:21:12 CET 2006
On Wed, Feb 01, 2006 at 01:29:57PM +0000, Mike Rylander wrote:
> On 1/31/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> [snip]
> >
> > I've been wondering whether it might not be cool to have something where
> > during creation, a ResultSource will check to see if (for a result_class
> > of MyDB::Foo) there's a MyDB::FooSet class, and if so use that as its
> > default resultset_class instead of DBIx::Class::ResultSet.
> >
> > But I dunno, and there's about 3 million different possible naming
> > convention you could use, which leads me to expect either a holy war or
> > needing to implement something like RDBO's ConventionManager if I try it.
> >
> > Anybody got any suggestions?
>
> How about
>
> MyDB::Foo->resultset_manager('MyDB::FooSet');
__PACKAGE__->result_source_instance->resultset_class('MyDB::FooSet');
would already work. I wasn't asking about that, I was asking about some
sort of "automatic defaulting" so people can easily create and use custom
resultsets in a standard way without the extra boilerplate.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
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