2

Small question: how do I order a result when I'm using populateRelation:

$object->populateRelation('OtherObject');

Thanks!

Remco
  • 172
  • 9

1 Answers1

2

You can either issue a separate query, or create your own sort algorithm outside Propel with the php function "usort". The "populateRelation" method is used only when sort order does not matter.

Ben
  • 713
  • 4
  • 12
  • Was afraid of that answer, allready went around it using php's usort, I'd prefer to push down that kind of operations to the database engine. Thanks, I'll try the separate query as well. – Remco Nov 16 '16 at 14:35