[DBIx-Class-Devel] [ANNOUNCE] A much faster DBIx::Class public
trial round two - v0.08241
Peter Rabbitson
rabbit+dbic at rabbit.us
Fri Feb 22 17:12:24 GMT 2013
On Fri, Feb 22, 2013 at 05:06:27PM +0000, Aaron Crane wrote:
> Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:
> > If the previous experimental release 0.08240 worked for you without
> > any glitches - the same should be true for 0.08241. If you have not yet
> > tested - PLEASE DO SO. If the release team does not hear anything within
> > a couple of weeks this will become the official 0.08250, and you will get
> > little sympathy if it ends up breaking your production afterwards ;)
>
> I have a test case that passes in 0.08206 (and when cherry-picked to
> master), but fails in topic/constructor_rewrite:
>
> my $rs = $schema->resultset('CD')->search({}, {
> join => 'artist',
> columns => ['me.title', 'length(artist.name)'],
> rows => 1,
> });
> my @values = $rs->cursor->next;
> like($values[1], qr/\A[0-9]+\z/,
> "nameless unidentifiable column works using ->cursor");
>
> That throws this exception:
>
> DBIx::Class::ResultSet::cursor(): Inflation into non-existent
> relationship 'length(artist' of 'CD' requested, check the inflation
> specification (columns/as) ending in '...length(artist.name)' at
> t/76select.t line 238
>
> It's questionable code, easily fixed to work on either branch by
> passing 'length(artist.name)' as a scalar reference, so I don't mind
> at all if you reject the case for representing an incorrect user
> expectation.
Well... for one this would "work" if you s/columns =>/select =>/. But it
will again stop working (also on 0.08206) the moment you enable
quote_names => 1 in our connection attributes. So my instinct is to
reject this as too much of a GIGO case.
What do you think?
More information about the DBIx-Class-Devel
mailing list