Can/should One use any ORM Solution is a Complex Situation like this ?
can this even be done with Propel or Doctrine ? at the moment I am using Propel. So I’d be glad If there is Propel solution for it.
If I do a direct query with propel what are the suggestion ?
SELECT I.*,((I.width*175)/I.height) as relativeWidth FROM
(SELECT * FROM Image WHERE owner = 1 LIMIT 5, 10) I
order by relativeWidth asc
and additionally What is the standard solution for the scenario where one needs to exequte really complex queries in most of the places in the application ?
There is a LIMIT 5, 10 that I use for Pagination. and its in inner Query. If its in View how can I control Pagination ?
Your query can be written as following with Propel 1.6.3:
Output is:
Note the
:p1is the binding parameter related to the owner value.So it’s really easy to create complex queries using Propel 🙂
William