[odb-users] ODB query

Tim Tao Tim.Tao at akunacapital.com
Tue Sep 22 13:33:16 EDT 2015


Hi Boris,


I got a question about ODB query statement, suppose I have the following odb objects:


#pragma db object

struct A{

    string name;

}


#pragma db object

struct B{

    std::shared_ptr<A> ptr;

}


Is there any way we can query table B by using condition ptr->name == "Tom" ?

Since A is a pointer in table B...I dont know how to write the query statement, I tried db->query<B>(query::name == "Tom") but got no lucky.


Thanks,


Tim



________________________________
[http://www.akunacapital.com/images/akuna.png]
Tim Tao | Junior Developer

| www.akunacapital.com <http://www.akunacapital.com>
p: | m: | f: | tim.tao at akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be confidential, legally privileged or otherwise protected from disclosure. This information is intended for the use of the addressee only and is not offered as investment advice to be relied upon for personal or professional use. Additionally, all electronic messages are recorded and stored in compliance pursuant to applicable SEC rules. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or any other use of, or any action in reliance on, the contents of this electronic message is strictly prohibited. If you have received this communication in error, please notify us by telephone at (312)994-4640 and destroy the original message.


More information about the odb-users mailing list