i think you should inject the Registry instead, and fetch the manager for this document instead: getManagerForClass