[odb-users] Re: sqlite mismatch in result column count

MM finjulhich at gmail.com
Mon Sep 14 09:40:56 EDT 2015


On 14 September 2015 at 14:35, Boris Kolpackov <boris at codesynthesis.com>
wrote:

> Hi,
>
> MM <finjulhich at gmail.com> writes:
>
> > The 4rd column (the missing one) is of type std::string in the c++ class
> > (B1), and of type TEXT in the db.
>
> You seem to be trying to map C++ classes to an existing schema. In this
> case it is very helpful to still ask ODB to generate the schema and then
> make sure that what gets generated is equivalent to the existing schema.
>
> For SQLite, use '--generate-schema --schema-format sql' to get the
> schema as a standalone .sql file.
>
> Boris
>

Yes, I do that too.
THe CREATE TABLE Statement does have 4 columns (3 INTEGER and 1 TEXT).

Normally,

#pragma odb (B1) abstract definition

is equivalent to

#pragma db object(B1) abstract definition
#pragma db member(B1::field)

with B1's base is abstract also, and F (derived from B) is not abstract

?


More information about the odb-users mailing list