XX-11175 - fixed some registration issues when querying registrations using orderby; added integration tests