Added support for specifying an EntityKey