[DBIx-Class-Devel] [ANNOUNCE] A much faster DBIx::Class public trial round two - v0.08241

Aaron Crane arc at cpan.org
Fri Feb 22 17:06:27 GMT 2013


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.

If you do want it, I'm happy to push a topic branch with the test
case, if that helps — a few days ago I asked on IRC for a commit bit,
for that very reason, but I guess noone was around at the time. :-)

-- 
Aaron Crane ** http://aaroncrane.co.uk/



More information about the DBIx-Class-Devel mailing list