[odb-users] Using query members while also renaming class members
Boris Kolpackov
boris at codesynthesis.com
Tue Apr 24 11:56:19 EDT 2018
I just tried to compile the following test with the latest master:
#include <string>
#pragma db object table("XPROCEDURE")
struct XProcedure
{
#pragma db id auto column("NR")
int nr;
#pragma db column("FILENAME")
std::string filename;
};
$ odb -q -d oracle test.hxx
In the generated test-odb.hxx header I see:
template <typename A>
const typename query_columns< ::XProcedure, id_oracle, A >::nr_type_
query_columns< ::XProcedure, id_oracle, A >::
nr (A::table_name, "\"NR\"", 0, 10);
Which is where the column name in your query comes from. Can you try
just this example and the command line that I used? If you would
like to try the latest pre-release, you can get it here:
https://codesynthesis.com/~boris/tmp/odb/pre-release/b.3/
Boris
More information about the odb-users
mailing list