[odb-users] collection mapping error

Boris Kolpackov boris at codesynthesis.com
Tue Mar 7 07:23:49 EST 2017


Hi Christian,

c.sell at byterefinery.de <c.sell at byterefinery.de> writes:

> However, the generated DDL marks the column as NOT NULL,

That's the default. You can override (i.e., allow NULLs) with:

#pragma db value_null


> and the vector<char> standard traits implementation always at least
> writes an empty column.

Right, since std::vector<> has no notion of a NULL value.


> Now someone explain to me why collection items can never be NULL. Anyway,
> while this is so, any traits implementation that generates NULL values is
> not suitable for value collections

None of this is correct/makes sense. But I hope the above explanations
will help (if not, please read the manual; we both could have saved a
lot of time if you did so from the beginning).

Boris



More information about the odb-users mailing list