Adding support for nested entities