commit 1bb7683697290a477945628126d513962de908f5
Author: Christian Ehringfeld <c.ehringfeld@t-online.de>
Date:   Tue Oct 6 14:50:06 2015 +0200

    ticket #595

diff --git a/src/entityinspector.cpp b/src/entityinspector.cpp
index c1977c5..802fe8d 100644
--- a/src/entityinspector.cpp
+++ b/src/entityinspector.cpp
@@ -96,15 +96,16 @@ void EntityInspector::checkMetaProperties(QHash<QString, QMetaProperty>
         QString typeName = QString(i.value().typeName());
         if (!i.value().isWritable()) {
             ok = false;
-            msg += "Property " + i.key() + " is not writable!\n”";
+            msg += "Property " + i.key() + " is not writable!\n";
         }
         if (!i.value().isReadable()) {
             ok = false;
-            msg += "Property " + i.key() + " is not readable!\n”";
+            msg += "Property " + i.key() + " is not readable!\n";
         }
         if (typeName.contains("QSharedPointer") && !relations.contains(i.key())) {
             ok = false;
-            msg += "For attribute " + i.key() + " is no relation defined!\n";
+            msg += "No relation defined for attribute " + i.key() + "!\n";
+
         } else if (typeName.contains("QPointer")) {
             ok = false;
             msg += i.key() + " must use QSharedPointer.\n";
diff --git a/src/querybuilder.cpp b/src/querybuilder.cpp
index 807064f..c762780 100644
--- a/src/querybuilder.cpp
+++ b/src/querybuilder.cpp
@@ -1097,17 +1097,13 @@ QString QueryBuilder::attributes(const QHash<QString, QVariant> &m,
                                  const QString &conjunction,
                                  bool ignoreID, const QString &primaryKey) const {
     QString rc = "";
-    if (!m.isEmpty()) {
-        auto i = m.constBegin();
-        while (i != m.constEnd()) {
+    for (auto i = m.constBegin(); i != m.constEnd(); ++i) {
             if (!ignoreID || (ignoreID && i.key() != primaryKey)) {
-                if (!(rc == "")) {
+                if (!rc.isEmpty()) {
                     rc += " " + conjunction + " ";
                 }
-                rc += this->schema->quoteColumnName(i.key()) + "=" + this->placeHolder(i.key());
+                rc += this->schema->quoteColumnName(i.key()) + (i.value().isNull() ? " is null":"=" + this->placeHolder(i.key()));
             }
-            ++i;
-        }
     }
     return rc;
 }
