diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-23 09:08:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-23 09:08:42 +0200 |
commit | 959f49cdeb02c1be24a535befde7b02de78a7fbd (patch) | |
tree | 249b4f5f0738568fa8813ecd7f7997aa16e853bb | |
parent | 9e2f9ffa375d1013e481e6b399941fdb8bd32ffa (diff) |
Use comparison instead of IS TRUE
The bool type can be mapped to a non-integral type, such as string.
-rw-r--r-- | odb/mysql/query.txx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/odb/mysql/query.txx b/odb/mysql/query.txx index 5063082..deafad0 100644 --- a/odb/mysql/query.txx +++ b/odb/mysql/query.txx @@ -15,7 +15,11 @@ namespace odb query (const query_column<bool, ID>& c) : clause_ (c.name ()) { - clause_ += " IS TRUE"; + // Cannot use IS TRUE here since database type can be a non- + // integral type. + // + clause_ += " = "; + append<bool, ID> (val_bind<bool> (true)); } // query_column |