diff --git a/include/sqlpp11/data_types/text/result_field.h b/include/sqlpp11/data_types/text/result_field.h index 80f16632..0c0f0d0b 100644 --- a/include/sqlpp11/data_types/text/result_field.h +++ b/include/sqlpp11/data_types/text/result_field.h @@ -47,7 +47,7 @@ namespace sqlpp size_t len{}; target._bind_text_result(index, &text, &len); this->_value = {text, len}; - this->_is_null = (len == 0); + this->_is_null = (text == nullptr); } template @@ -57,7 +57,7 @@ namespace sqlpp size_t len{}; target._post_bind_text_result(index, &text, &len); this->_value = {text, len}; - this->_is_null = (len == 0); + this->_is_null = (text == nullptr); } };