[Dbix-class] can't use order by on a column created with "select as"

phaylon phaylon at dunkelheit.at
Mon May 15 11:21:31 CEST 2006


Gabrielle said:

> I am assuming the problem is that the 'DISTANCE' column
> is created with the "select as" clause.  Please let me know if anyone has
> run into this before.

The as keyword doesn't lead to a "SELECT foo AS bar" in the resulting
query, it's IIRC merely a mapping on DBICs side. You might want to try
something like

  #  untested
  $rs->search({ foo => 1 }, { select => \'foo * 2 AS bar' });

p




More information about the Dbix-class mailing list