added exception when getting entity not in table