Creates an instance of T from the provided map. The map keys are the attribute names (typically in snake_case as they come from DB).