[odb-users] query for composite value?

Christian Sell christian at gsvitec.com
Fri Sep 25 14:05:28 EDT 2015


Hello,
 
I have a mapped class with a composite key, like:
 

struct OverlayGroup
{
  struct Key {
    unsigned sourceId;
    string name;

    Key(unsigned sourceId=0, string name="") : sourceId(sourceId), name(name) {}

    bool operator<(const Key &other) const {
       return sourceId == other.sourceId ? name < other.name : sourceId <
other.sourceId;
    }
   } key;

   string description;
}

and I would like to query for the name (which is embedd inside the Key value
class). How?

thanks,
Chris



More information about the odb-users mailing list