I have a table Projects with a one to many relationship with notes.
I want the newest note added to appear on the top of the list.
I've added this to the notes.php file
function beforeHandleRequest(){
$query =& Dataface_Application::getInstance()->getQuery();
if ( !$_POST and $query['-table'] == 'notes' and !isset($query['-related%3Asort']) ){
$query['-related%3Asort'] = 'id desc';
}
}
However this doesn't work. Do you have any suggestions?