Change getEntity to getObject