work with doctrine proxies