removed addOrUpdateEntity() replaced with more efficient approach