added support for doctrine inheritance