elgg_list_entities ... sort on metadata?

If I have an object with subtype 'social_events'  and a metadata field 'start_date' ... how can I, using the standard new Elgg functions and no SQL, display a list so that the newest entities come first?

This does not work:

echo elgg_list_entities(array(  'types' => 'object',

                                        'subtypes' => 'social_events',

                                        'order_by' => 'start_date desc') );

  • The list functions in metadata.php have not been updated to the new elgg_list* format so you'll have to use elgg_get_entities_from_metadata() and then call elgg_view_entity_list().