[odb-users] Using query members while also renaming class members

Fabian Fritz fabianfuture at web.de
Wed Apr 18 15:16:46 EDT 2018


Hi,

I have created a class MyClass from an existing table and used #pragma
db member("MYCOLUMN") above a member mycolumn, so I don't have to use
the uppercase name all the time. Now if I use
query<MyClass>::mycolumn, I get errors, because the query puts
"mycolumn" instead of MYCOLUMN in the sql.

So my question is: can you use member("MYCOLUMN") to rename class
members (i.e. map them to the actual column names) while still using
the query interface?

Thanks,
Fabian



More information about the odb-users mailing list