getConnection in model class