From a00f37b024e1a0888de3266af9acff99e6f21aa2 Mon Sep 17 00:00:00 2001
From: Jaroslaw Staniek <staniek@kde.org>
Date: Tue, 1 May 2018 23:29:06 +0200
Subject: Fix loading object data for given type and ID

FIXED-IN:3.1.1

CCBUG:393705
---
 src/KDbConnection.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/KDbConnection.cpp b/src/KDbConnection.cpp
index d416d12..690752d 100644
--- a/src/KDbConnection.cpp
+++ b/src/KDbConnection.cpp
@@ -2188,7 +2188,7 @@ tristate KDbConnection::loadObjectData(int type, int id, KDbObject* object)
         }
     } else {
         if (true != querySingleRecord(KDbEscapedString("SELECT o_id, o_type, o_name, o_caption, o_desc "
-                                                       "FROM kexi__objects WHERE o_type=%1 AND o_id=%1")
+                                                       "FROM kexi__objects WHERE o_type=%1 AND o_id=%2")
                                           .arg(d->driver->valueToSql(KDbField::Integer, type))
                                           .arg(d->driver->valueToSql(KDbField::Integer, id)),
                                       &data))
-- 
cgit v0.11.2
