CYKLO-948: store selected resource classes in a category query
definition by id rather than by name
improved error handling