changed to model_class._as_entity()