added orderIdx field to the entity class