In Rails (and even in Doctrine < 2, IIRC) you can specify a default order for any model. For example, if you tell Rails to always order your customer
table by name
, Customer.all
will always a list of customers ordered by name
. It makes an enormous amount of sense.
From what I gather it's not possible to do this in Doctrine 2. Evidently they want you to create a query instead.
It would be a very DRY, logical and convenient feature to include, and an outstandingly stupid feature to choose to leave out, it seems to me.
I sincerely hope I'm wrong about this option not existing, and before I cry myself to sleep tonight, I wanted to check to see if maybe Doctrine does actually have a way to specify a default order and I just haven't been able to find it. Can anyone enlighten me?