Improvements for GEOT-4582: App-schema generates empty order by if there
is no Primary Key and SQL based idExpression