If that's more than you were interested in, you can do this:
$q = Doctrine_Table::Create()->
select('*')->
from('customer as c')->
orderBy('first_name ASC');

$customers = $q->execute();

Throw that into a method in a table class (a solid design practice
anyway), and then you have less code than you would had in the first
place.

On Tue, Jan 19, 2010 at 11:05 AM, Darren884 <[email protected]> wrote:
> Isn't there any other way? Is it truly that tedious to set a default
> sort option?
>
> On Jan 19, 2:39 am, Florian <[email protected]> wrote:
>> Hi darren,
>>
>> You should read this :
>>
>> http://www.doctrine-project.org/blog/cookbook-recipe-relation-dql-beh...
>>
>> On 18 jan, 18:30, Darren884 <[email protected]> wrote:
>>
>> > Hello all, my customer model currently defaults to sorting by id asc.
>> > How do I change it to default to sort by name asc?
>>
>> > Thanks,
>> > Darren
>
> --
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to