Added addEntity() for resolving entity as array rather than key/value
pairs