[Dbix-class] find redux
Matt S Trout
dbix-class at trout.me.uk
Sun Feb 17 16:03:12 GMT 2008
On Thu, Feb 14, 2008 at 10:47:06PM +0100, Zbigniew Lukasiak wrote:
> On Thu, Feb 14, 2008 at 3:04 PM, Matt S Trout <dbix-class at trout.me.uk> wrote:
> >
> > On Wed, Feb 13, 2008 at 08:31:42PM +0100, Zbigniew Lukasiak wrote:
> > > On Feb 13, 2008 5:51 PM, Guillermo Roditi <groditi at gmail.com> wrote:
> > > > > I attach a patch (against
> > > > > http://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/trunk) that
> > > > > does more or less that - when you specify the unique key it ignores
> > > > > all columns from the query that don't belong to it (
> > > >
> > > > I find this to be desired behavior Zbigniew Lukasiak++
> > >
> > > Thanks. Frankly I don't think that warning is necessary - I like to
> > > use find directly from the query parameters without removing all the
> > > unneeded columns. Without it that patch is even more trivial
> > > (attached here).
> >
> > Looks good. Fancy doing the warn-if-more-than-one-result bit while you're
> > in there as well?
>
> Attached. I think it could even croak in that case.
Your patch seems to bypass using $rs->single, which is a useful performance
optimisation.
Please fix that.
Also, shouldn't you ignore @unique_queries altogether if you've got a key
attr or am I misunderstanding the impact?
--
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 DBIx-Class
mailing list