[odb-users] Bug Report: Multiple database command line arguments

Matthew Borger matthew at borgernet.com
Thu May 1 20:46:34 EDT 2014


Just wanted to report an interesting bug I found with the command line 
arguments to the odb executable.

Given the following simple file, let's call it Foo.hpp:

#pragma db object
class Foo
{
     public:
     #pragma db id
     long id;
};

Now I want to make dynamic multiple database support for common and 
sqlite to simplify things.

$> odb -d common -d sqlite --multi-database dynamic Foo.hpp

This works as expected resulting in the following files.
Foo-odb.cxx  Foo-odb.ixx         Foo-odb-sqlite.hxx
Foo-odb.hxx  Foo-odb-sqlite.cxx  Foo-odb-sqlite.ixx

But if I use the full argument for database, then odb seems to only 
create the files for the first database specified.

$> odb --database common --database sqlite --multi-database dynamic Foo.hpp
Generated files: Foo-odb.cxx  Foo-odb.hxx  Foo-odb.ixx

$> odb --database sqlite --database common --multi-database dynamic Foo.hpp
Generated files: Foo-odb-sqlite.cxx  Foo-odb-sqlite.hxx Foo-odb-sqlite.ixx

This was done on Ubuntu 14.04 using odb 2.3.0. The multi-database 
setting doesn't matter, the results are the same.

Odb is a great product. Thank you for your efforts on it.

Matt Borger



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3916 bytes
Desc: S/MIME Cryptographic Signature
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20140501/82edccdb/smime.bin


More information about the odb-users mailing list