On Tue, 14 Oct 2008 12:09:52 -0700 Marc Mims <[EMAIL PROTECTED]> wrote:
> Are you sure you need the "as" alias for the order by? The example you > gave to demonstrate the problem is perhaps too trivial. Yeah, I tried to limit it to the bare bones necessary to reproduce the problem. :-) In the scenario I have there's a method (of a custom resultset object) that takes a resultset ($self) and returns a resultset. The users of this method need not know about the details, they just use the returned resultset in further search() calls and simply use the additional column added by the method. Even in an 'order_by' attribute. It would be very inconvenient if I had to pass the SQL string used to construct the extra column.. (And the method not only adds this column, but adds conditions to the resultset, so simply moving the code that generates the extra column into a function is not enough here.) Now, the above setup works fine - up to the point when I use 'distinct' in a search(). (In fact, there's another problem with it, using '+select' on the resultset clears the previous columns added by '+select' - see the other thread I started.) norbi _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
