Inject the service manager into doctrine entities