[Dbix-class] SQL::Abstract regression?

Peter Rabbitson rabbit+dbic at rabbit.us
Mon Jul 13 17:01:52 GMT 2009


On Mon, Jul 13, 2009 at 11:11:20AM -0500, Paul Makepeace wrote:
> On Mon, Jul 13, 2009 at 11:03 AM, Rob Kinyon<rob.kinyon at gmail.com> wrote:
> > On Mon, Jul 13, 2009 at 11:52, Paul Makepeace<paulm at paulm.com> wrote:
> > [snip]
> >> specifically, FROM (SELECT COUNT( publication_story.uid ) AS
> >> story_count, ... looks wrong. Or should I update my code somehow?
> >>
> >> This error coincides with upgrading to latest DBIx::Class today.
> >
> > What do you expect to see?
> 
> My question is what do _you_ expect to see?

I expect to see exactly what you have pasted. Also being an ass will
not take you very far with support.

> I would fairly reasonably expect to produce SELECT
> COUNT(publication_story.uid) AS story_count and not have that appear
> in the FROM clause (?!)

Read the SQL more carefully then.

> This has been working until today when I upgraded, so a recent version
> of $module has broken this.

I need you to *manually* execute the following snippet against your
database:

SELECT COUNT( publication_story.uid ) AS
story_count, me.uid, me.name, me.short_name, me.url, me.description,
me.publication_type_uid, me.region_uid, me.channel_type_uid,
me.circulation, me.ave1, me.ave2, me.comments FROM publication me
WHERE ( ( name LIKE ? OR short_name LIKE ? ) ) GROUP BY me.uid ORDER
BY name

Let me know if the error persists or you get a somewhat reasonable
result back.



More information about the DBIx-Class mailing list