diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-11-15 12:00:37 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-11-16 11:17:08 +0200 |
commit | 4a5f1f5c8202e4a7833db4614e6cfe47e00be102 (patch) | |
tree | 8ab3246a6d0d267abb9a05efbf62dbbf02495fe5 | |
parent | 66a01c2f277a0118ee4307fcfaf07df81218497e (diff) |
Map QByteArray to Oracle BLOB by default
-rw-r--r-- | odb/qt/basic/oracle/default-mapping.hxx | 4 | ||||
-rw-r--r-- | odb/qt/basic/oracle/qbyte-array-traits.hxx | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/odb/qt/basic/oracle/default-mapping.hxx b/odb/qt/basic/oracle/default-mapping.hxx index 1fe6de0..5194b5e 100644 --- a/odb/qt/basic/oracle/default-mapping.hxx +++ b/odb/qt/basic/oracle/default-mapping.hxx @@ -14,9 +14,9 @@ // #pragma db value(QString) type("VARCHAR2(4000)") null -// Map QByteArray to Oracle RAW by default. Allow NULL values by default as +// Map QByteArray to Oracle BLOB by default. Allow NULL values by default as // QByteArray provides a null representation. // -#pragma db value(QByteArray) type("RAW(2000)") null +#pragma db value(QByteArray) type("BLOB") null #endif // ODB_QT_BASIC_ORACLE_DEFAULT_MAPPING_HXX diff --git a/odb/qt/basic/oracle/qbyte-array-traits.hxx b/odb/qt/basic/oracle/qbyte-array-traits.hxx index 063d52d..0d63fec 100644 --- a/odb/qt/basic/oracle/qbyte-array-traits.hxx +++ b/odb/qt/basic/oracle/qbyte-array-traits.hxx @@ -156,7 +156,10 @@ namespace odb template <> struct default_type_traits<QByteArray> { - static const database_type_id db_type_id = id_blob; + // Allow use of QByteArray in query expressions by default by specifying + // the default type id as RAW. + // + static const database_type_id db_type_id = id_raw; }; } } |