On 11 March 2013 19:20, Smit Patel <smitpate...@gmail.com> wrote: > Git commit 4151efca7a901c1d954aaddc85caa404bc12fdc7 by Smit Patel. > Committed on 11/03/2013 at 19:19. > Pushed by smitpatel into branch 'kexidb-in-biblio-smit'. > > use field name as first operand. > Fixes LIKE, NULL, NOT NULL where clauses > > M +2 -2 libs/db/queryschema.cpp > > http://commits.kde.org/calligra/4151efca7a901c1d954aaddc85caa404bc12fdc7 > > diff --git a/libs/db/queryschema.cpp b/libs/db/queryschema.cpp > index a992bc4..4d9e671 100644 > --- a/libs/db/queryschema.cpp > +++ b/libs/db/queryschema.cpp > @@ -1742,9 +1742,9 @@ void QuerySchema::addToWhereExpression(KexiDB::Field > *field, const QVariant& val > > BinaryExpr * newExpr = new BinaryExpr( > KexiDBExpr_Relational, > - new ConstExpr(token, value), > + new VariableExpr((field->table() ? (field->table()->name() + ".") : > QString()) + field->name()), > relation, > - new VariableExpr((field->table() ? (field->table()->name() + ".") : > QString()) + field->name()) > + new ConstExpr(token, value) > ); > if (d->whereExpr) { > d->whereExpr = new BinaryExpr(
Looks OK, thanks, I guess it can be committed to master and 2.6! -- regards / pozdrawiam, Jaroslaw Staniek Kexi & Calligra & KDE | http://calligra.org/kexi | http://kde.org Qt Certified Specialist | http://qt-project.org http://www.linkedin.com/in/jstaniek _______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel