I use the Propel 2 ORM in my php webapplication and in a certain query I like to order my results by field.
$orderedIdArray = array(20, 10, 15, 30);
MyClassQuery::create()
->filterById($orderedIdArray, Criteria::IN)
//->orderByField("Id", $orderedIdArray) --> method does not exist in Propel
->find();
I found a solution online to do this via Propel Criteria for the Peer Class. http://shout.setfive.com/2009/10/13/adding-order-by-field-to-propel-criterias/
However I want to do this with my Query Class. How would you implement the method in the Query Class?