From 6149a26d16e63d6ab1d2a47a2135a835a8d2caef Mon Sep 17 00:00:00 2001
From: Boris Kolpackov <boris@codesynthesis.com>
Date: Tue, 20 Sep 2011 11:53:03 +0200
Subject: Change query syntax to use . for composite and -> for object pointer
 access

Also make non-inverse query columns act as both an object pointer and a
normal column. The latter allows us to use natural expressions such as
query<employee>::employer.is_null ().
---
 qt/driver.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'qt')

diff --git a/qt/driver.cxx b/qt/driver.cxx
index 3042b48..e15708b 100644
--- a/qt/driver.cxx
+++ b/qt/driver.cxx
@@ -159,7 +159,7 @@ main (int argc, char* argv[])
       transaction t (db->begin ());
 
       result r (db->query<Employee> (
-                  query::employer::name == "Complex Systems Inc" &&
+                  query::employer->name == "Complex Systems Inc" &&
                   query::born < QDate (1978, 4, 1)));
 
       for (result::iterator i (r.begin ()); i != r.end (); ++i)
-- 
cgit v1.1