On 6/24/06, A. Pagaltzis <[EMAIL PROTECTED]> wrote: > * Rich <[EMAIL PROTECTED]> [2006-06-24 17:15]: > > Could anyone help me get my head around how I implement a > > common base class for, and subclasses of, autogenerated > > DBIx::Class classes? > > > > Going with a simple example: > > > > > > Foo::User Foo::Project <<< My sub classes > > | | > > | | > > Foo::user Foo::project <<< sqlt generated DBIx::Class classes > > \ / > > \ / > > \ / > > \ / > > \ / > > \ / > > Foo::Base <<< Common functionality > > I'm going to go out entirely on a lark and say you'll probably be > able to get what you want quite easily if you use a different > inheritance tree: > > Foo::User Foo::Project <<< Subclasses > |\ /| > | \ / | > | \ / | > Foo::user \ / Foo::project <<< sqlt generated DBIx::Class classes > \ / > \ / > Foo::Base <<< Common functionality >
I would tend to agree with Aristotle on the heirarchy. But also note that if you are playing inheritance games with DBIx::Class::ResultSource-based classes, you'll have to deal the issues recently docced to this list by Sebastian Willert at: http://lists.rawmode.org/pipermail/dbix-class/2006-June/001691.html _______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
