Fixing bug when creating objects with OCCResourceMixin