commit 5f3c7a9c40bbfeb81c52f55dadd338acb68e1ef1
Author: Christian Ehringfeld <c.ehringfeld@t-online.de>
Date:   Sat Sep 26 23:26:05 2015 +0200

    typo checker

diff --git a/src/entityinspector.cpp b/src/entityinspector.cpp
index a271d84..002653e 100644
--- a/src/entityinspector.cpp
+++ b/src/entityinspector.cpp
@@ -114,7 +114,6 @@ void EntityInspector::checkMetaProperties(QHash<QString, QMetaProperty>
     }
 }
 
-
 bool EntityInspector::verifyRelations(Entity *&entity, QString &msg) {
     bool ok = true;
     auto metaProperties = EntityHelper::getMetaProperties(entity);
@@ -122,8 +121,10 @@ bool EntityInspector::verifyRelations(Entity *&entity, QString &msg) {
     QString iMsg = "";
     this->checkMetaProperties(metaProperties, iMsg, ok, relations);
     for (auto i = relations.constBegin(); i != relations.constEnd(); ++i) {
+        this->checkRelationTypos(i.key(), i.value(), iMsg, ok);
         if (!metaProperties.contains(i.key())) {
-            iMsg += "For relation " + i.key() + " is no property.";
+            iMsg += "For relation " + i.key() + " no property exists.";
+            ok = false;
         } else {
             auto metaProperty = metaProperties.value(i.key());
             if (!QString(metaProperty.typeName()).contains("QSharedPointer")) {
@@ -169,7 +170,6 @@ void EntityInspector::verifyTransientAttributes(Entity *&entity, QString &msg) {
         qWarning() << iMsg;
         msg += iMsg;
     }
-
 }
 
 bool EntityInspector::checkRelation(const QVariant &entity,
@@ -202,6 +202,16 @@ bool EntityInspector::checkRelation(const QVariant &entity,
     return true;
 }
 
+void EntityInspector::checkRelationTypos(const QString &name, const Relation &r,
+        QString &msg, bool &ok) {
+    if (name != r.getPropertyName()) {
+        ok = false;
+        msg += "Relation " + name + " has a typo.\n";
+        msg += "Name " + name + "and relation name " + r.getPropertyName() +
+               " are not equal.\n";
+    }
+}
+
 bool EntityInspector::checkPrimaryKey(Entity *&entity, QString &msg) {
     QString pk = entity->getPrimaryKey();
     auto metaprops = EntityHelper::getMetaProperties(entity);
diff --git a/src/entityinspector.h b/src/entityinspector.h
index 0c061f3..0e36482 100644
--- a/src/entityinspector.h
+++ b/src/entityinspector.h
@@ -41,6 +41,7 @@ class EntityInspector {
     void verifyTransientAttributes(Entity *&entity, QString &msg);
     bool checkRelation(const QVariant &entity, const Relation &r, QString &msg,
                        const QMetaProperty &property) const;
+    void checkRelationTypos(const QString &name, const Relation &r, QString &msg, bool &ok);
     bool checkPrimaryKey(Entity *&entity, QString &msg);
     void verifyBlobAttributes(Entity *&entity, QString &msg);
     void checkMetaProperties(QHash<QString, QMetaProperty> &metaProperties,
diff --git a/src/logger.cpp b/src/logger.cpp
index 37c8085..1c0be6e 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -13,7 +13,6 @@
  * You should have received a copy of the GNU Lesser General Public License
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
-
 #include "logger.h"
 #include <QDir>
 #include <QDebug>
