[odb-users] Cannot create schema

Boris Kolpackov boris at codesynthesis.com
Mon Oct 31 09:24:45 EDT 2011


Hi Michał,

Michał Snoch <kontakt at msnoch.pl> writes:

> I checked if my method is called more than once, but
> unfortunately it is called once only. I'm now using 1.6
> version of ODB. In earlier versions everything was ok.

I created a test based on the header declarations you sent in your
previous email. The test can be found here:

http://codesynthesis.com/~boris/tmp/odb/test.tar.gz

To build the test I used the following command lines:

odb -d pgsql -p qt -p boost -s --schema-format embedded node.h
odb -d pgsql -p qt -p boost -s --schema-format embedded departure.h
odb -d pgsql -p qt -p boost -s --schema-format embedded connection.h

g++ node-odb.cxx departure-odb.cxx connection-odb.cxx driver.cxx \
-o driver -lodb-pgsql -lodb-qt -lodb-boost -lodb -lQtCore

I then ran the driver like this (I use the odb_test user and database
for ODB testing):

./driver --user odb_test --database odb_test

The test runs without any problems. I then ran psql to verify that
the Node table was created:

psql --username=odb_test --dbname=odb_test
> SELECT * FROM "Node";

 id | street | name | lat | lon 
----+--------+------+-----+-----
(0 rows)

I ran this test multiple times on both PostgreSQL 9.0 and 9.1 and
never got the error that you are observing.

Can you try this test in your setup and see if it works for you?

Boris



More information about the odb-users mailing list