[odb-users] query for composite value?

Christian Sell christian at gsvitec.com
Fri Sep 25 14:13:22 EDT 2015


never mind. A look at the "composite" example shows that the syntax is
 
query_t::key.name == name

> Christian Sell <christian at gsvitec.com> hat am 25. September 2015 um 20:05
> geschrieben:
>
>
> 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
>
Christian Sell

GS Vitec GmbH
Im Ziegelhaus 6-8
D-63571 Gelnhausen

mail: christian at gsvitec.com
mobil: +49 (0) 173 5384289

Tel: +49 (0) 6051 601.26-90
Fax: +49 (0) 6051 601.26-91



More information about the odb-users mailing list