[odb-users] collection mapping error
c.sell at byterefinery.de
c.sell at byterefinery.de
Mon Mar 6 12:10:36 EST 2017
ok, found it. The issue lies in the line my traits implementation that says
is_null = v.isNull();
meaning, the column ist marked NULL if QImage#isNull() returns true.
Which, in my mind, makes a lot of sense. However, the generated DDL
marks the column as NOT NULL, and the vector<char> standard traits
implementation always at least writes an empty column.
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
regards,
Chris
Zitat von Boris Kolpackov <boris at codesynthesis.com>:
> Hi Christian,
>
> c.sell at byterefinery.de <c.sell at byterefinery.de> writes:
>
>> It appears that the binding code is not executed because in function
>> insert(), the data_binding_test_version () check fails:
>>
>> if (sts.data_binding_test_version ())
>> {
>> const binding& id (sts.id_binding ());
>> bind (sts.data_bind (), id.bind, id.count, di);
>> sts.data_binding_update_version ();
>> }
>>
>>
>> in my test case program, the if branch is entered once for the collection
>> object. With my target app, it isn't ever
>
> Yeah, that's fishy. Smells like memory corruption. You can try two things:
>
> 1. Try to plug your QImage implementation into the test case. The idea is
> basically to try to "bring" the test case a step at a time closer to
> your application and see what triggers the change.
>
> 2. Try to run something like valgrind on your application (or the test
> case if you manage to make it fail).
>
> Boris
More information about the odb-users
mailing list