findEntityByKey fixes for inheritance