Ok then, **Axon.ivy >= 6.7**
This issue has been fixed with the Axon.ivy version >= 6.7. See issue [XIVY-2042 Business Data Sorting fails on a field for now the fastest solution is that you fire which no data exists][1]
**Before Axon.ivy 6.7**
As a workaround add a simple BusinessData existence check query before you do the real query.
long totalCount = BusinessDataRepository.get().search(MyBusinessData.class).execute().totalCount();
if (totalCount > 0)
{
//you query here...
}
But that is just a work around. In the future we will handle that inconvenience within our code. Our support will address this issue in a few days.
[1]: https://jira.axonivy.com/jira/browse/XIVY-2042