I’ve added a post object column to an admin edit table (edit.php?post_type=test) using this action: add_action( ‘manage_test_posts_custom_column’, …) and marked it as sortable: add_filter( ‘manage_edit-test_sortable_columns’, …).
Then you have to hook into: add_action( ‘load-edit.php’, …) and modify the request filter: add_filter(‘request’, …)
There you have to set the right ‘meta_key’ and ‘orderby’, but this doesn’t work, because the ‘post object’ holds just the post-id of the relation.
Is there any way to order the table by the post object’s title or any other field of this relationship?
You would need to do a query of the posts of that type, getting them all 'posts_per_page' => -1, and order them by whatever you want to order them by. You can return just a list of IDs by setting 'feilds' => 'ids', Then you can use this returned array of IDs to order your posts. To do this you set 'post__in' => $return_from_first_query, and 'orderby' => 'post__in'.
Well, yes, there is that, the solution is not perfect and does not scale well. Another solution would be.
use an acf/save_post filter. When your posts are saved get the title of the post object field and store that in another custom field not controlled by ACF. Then sort based on this field. What this does is it makes the title of the related post a value associated with the post.
A more complicated solution would be to use $wpdb and construct your own MySQL query to do the work, but this solution is beyond me.