class GenericDAO {

    public void update(PK id, T model) {
        try (Connection connection = connectionProvider.get()) {
            Map<?, ?> map = MAPPER.map(model);
            Map<String, ?> result = R.table(tableName).get(id).update(map).run(connection);

            if (((Long) result.get("errors")) > 0) {
                throw new ReqlClientError("Failed to update model. %s", ((String) result.get("first_error")).split("\n")[0]);
            }
        }
    }

    public  GenericDAO(Provider<Connection> connection, Class<T> clazz, String tableName, String primaryKey);

}