[odb-users] typedef query<person> query issue

Bright Dadson losintikfos at yahoo.co.uk
Mon Feb 21 10:18:54 EST 2011

hello guys,

I am following the example:

typedef odb::query<person> query;
typedef odb::result<person> result;
// Say hello to those over 30.
  transaction t (db->begin ());
  result r (db->query<person> (query::age > 30));
  for (result::iterator i (r.begin ()); i != r.end (); ++i)
  cout << "Hello, " << i->first () << "!" << endl;
   t.commit ();

Unfortunately the syntax query::age do not seem to resolve the object type age. 
I have made age a public attribute and re-generated the odb-classes yet no joy. 

I am using Netbeans. Do anyone knows what I am doing wrong?


More information about the odb-users mailing list