commit ae3319105c059f4d70f3ac3d020f57ee220ed48a
Author: Christian Ehringfeld <c.ehringfeld@t-online.de>
Date:   Fri Aug 7 20:34:06 2015 +0200

    fix

diff --git a/src/logger.cpp b/src/logger.cpp
index 5d44e80..1ac578b 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -45,7 +45,11 @@ void Logger::lastError(const QSqlQuery &q, bool logQuery) {
         if (logQuery || !errorMsg.isEmpty()) {
             const QString query = this->generateLogMsg(q);
             if (!query.isEmpty()) {
-                qDebug() << query;
+                if (errorMsg.isEmpty()) {
+                    qDebug() << query;
+                } else {
+                    qWarning() << query;
+                }
                 stream << query;
             }
         }
diff --git a/src/query.cpp b/src/query.cpp
index 2ffab80..b6b9f1f 100644
--- a/src/query.cpp
+++ b/src/query.cpp
@@ -15,7 +15,6 @@
  */
 
 #include "query.h"
-#include "orderby.h"
 using namespace CuteEntityManager;
 Query::Query() {
 }
diff --git a/src/query.h b/src/query.h
index 3c47765..8e0b54b 100644
--- a/src/query.h
+++ b/src/query.h
@@ -21,7 +21,7 @@
 #include <QLinkedList>
 #include "join.h"
 #include "expression.h"
-
+#include "orderby.h"
 namespace CuteEntityManager {
 class Condition;
 class OrderBy;
