Added support of sub-entities.