setCode & setName have been virtualized to enable setting of name and code for both object and attached resource at the same time