menuCategory.hasMenuItems.allObjects
is an array so you can sort it to get the appropriate item. You could sort it each time or keep a sorted cache of the content. Neither of these options is ideal.
Really, you want to use a fetch request with a sort descriptor, ideally managed by a fetch request controller. Usually you would do that by using the relationship 'backwards'. So, you create the fetch and set the predicate to XXX = %@
, where XXX is the relationship name and the supplied parameter is menuCategory
.
This is assuming the relationship is 1:many, if it's many:many you will need a different predicate form.