aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-07-22 10:02:00 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-07-22 10:02:00 +0200
commitcf212c1ed64956b745a077e1a8f3d92be396e27d (patch)
treec60dcce2d80d9d9e6430c4675eb1206bcaf69f1d
parentd8b3a3388349d7055423f35911ef8ae17aba5ab4 (diff)
Make MySQL QString default mapping consistent with other databases
-rw-r--r--odb/qt/basic/mysql/default-mapping.hxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/odb/qt/basic/mysql/default-mapping.hxx b/odb/qt/basic/mysql/default-mapping.hxx
index e26e73e..ce692bf 100644
--- a/odb/qt/basic/mysql/default-mapping.hxx
+++ b/odb/qt/basic/mysql/default-mapping.hxx
@@ -9,10 +9,11 @@
#include <QtCore/QString>
#include <QtCore/QByteArray>
-// By default, map QString to MySQL TEXT for non-id and to VARCHAR(256) for
-// id members. MySQL cannot have primary keys of the TEXT type.
+// Map QString to MySQL TEXT for non-id and to VARCHAR(256) for id members.
+// MySQL cannot have primary key of the TEXT type. Allow NULL values by
+// default as QString provides a null representation.
//
-#pragma db value(QString) type("TEXT") id_type("VARCHAR(256)")
+#pragma db value(QString) type("TEXT") id_type("VARCHAR(256)") null
// Map QByteArray to MySQL BLOB by default. Allow NULL values by default as
// QByteArray provides a null representation.