Login | Register
My pages Projects Community openCollabNet

propel
Reply to message

* = Required fields
* Subject
* Body
Attachments
Send reply to
Topic
Author (directly in email)
Please type the letters in the image above.

Original message

Author hlellelid
Full name Hans Lellelid
Date 2006-05-31 04:36:50 PDT
Message tamcy wrote:
> Hi devs,
>
> PDO support and Criteria2 are what I'm looking for, so I am really
> happy to see they're coming to Propel :). I have a concern about order
> by clauses and I hope this is on the topic. "Order by" clauses are
> mostly but not neccearily columns, e.g. "order by case when no='4'
> then 1 when no='1' then 2 when no='2' then 3 end, col2" is possible
> (and I just encounter real need to this).
>
> It looks like current Criteria2 is still possible to do so by a, say,
> CustomOrderByColumn class. But this class will then be a decendant of
> QueryColumn, which doesn't "sound right" because a ColumnMap seems
> "too much" for my CustomOrderByColumn class. Also there is no way for
> me to add my own CustomOrderByColumn object to the Query class.

Yeah, I ran into that exact issue; I haven't completely solved it yet,
but I needed the same thing -- a QueryColumn that wasn't tied to a
column map for SELECT statements -- e.g. SELECT COUNT(id) ...

So, we will be rethinking this so that there is a more low-level column
class that doesn't have a ColumnMap. Then SelectColumn and
OrderByColumn could extend this.

We may also use an interface as you suggest -- that would work.

Thanks for the suggestion!

Hans