[odb-users] table creation failure and odb log files

Ella Vishnevsky ellav at checkpoint.com
Tue May 3 09:07:50 EDT 2016


Hey,

I'm running odb compiler(version 2.1.1) from gcc compiler.

My ODB makefile has 2 tables, that are mapped to the same schema name, for example:
                odbCompiler  -d sqlite --generate-query --generate-schema --schema-name one person.h && cp person-odb.cxx person-odb.cpp
                odbCompiler  -d sqlite --generate-query --generate-schema --schema-name one person2.h && cp person2-odb.cxx person2-odb.cpp

I'm also compiling person.cpp, person2.cpp, person-odb.cpp and person2-odb.cpp. (static compilation)

My problem is that only one table is being created when I run the following:

odb::database *m_db_3 = new odb::sqlite::database("TEST",SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE);
odb::transaction t (m_db_3->begin ());
try{
m_db_3->query<person> (false); //HERE IS THE PROBLEM
}
catch(const odb::exception& e)
{
                odb::schema_catalog::create_schema (*m_db_3,"one");
}
t.commit();

If I change from "m_db_3->query<person> (false); "     to    " m_db_3->query<person2> (false);" -> both tables will be created.
Can't figure out why.



1.  Did anyone had this problem?

2.  Are there any logs  or data that I can get from the odb? (maybe the commands that are being executed or any other information that can help me)


Thanks a lot



More information about the odb-users mailing list