DBIx::Class - Related Tables
Matt S Trout
dbix-class at trout.me.uk
Tue Oct 7 18:18:08 BST 2008
On Tue, Oct 07, 2008 at 09:03:08AM +0100, Dave Hodgkinson wrote:
> Then what's the benefit of an ORM? (general question, not just to you :)
>
>
> I'm a big fan of an application-specific wrapper over the d/b that
> does what you need, so in Dave's case a get_highest_version() sub
> with the SQL inside. Is that now passé?
Nothing wrong with that.
For those of us who've been doing DBIC for a while, it's quicker for us to
write get_highest_version using DBIC than using plain SQL, because it's more
concise and survives things like table renames.
It's one of those things - once you know how to use $library, it's quicker
to use $library to do $thing than it is to write code by hand to do it.
Until you know $library well enough, then that's not true - and learning
$library sufficiently for that may not be an investment worth making just
now.
The same statements probably apply with s/$library/$editor/ and many other
such substitutions.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the london.pm
mailing list