[odb-users] collection mapping error

c.sell at byterefinery.de c.sell at byterefinery.de
Mon Mar 6 04:05:36 EST 2017


below is the generated code that is executed immediately before the  
sql statement fails, and of which which I assume that is provides the  
parameter values. object_id is suspiciously missing:


   void access::object_traits_impl< ::rentalapp::Damage, id_sqlite  
 >::odb_pictures_traits::
   init (data_image_type& i,
         index_type* j,
         const value_type& v)
   {
     using namespace sqlite;

     statement_kind sk (statement_insert);
     ODB_POTENTIALLY_UNUSED (sk);

     bool grew (false);

     // index
     //
     if (j != 0)
     {
       bool is_null (false);
       sqlite::value_traits<
           index_type,
           sqlite::id_integer >::set_image (
         i.index_value,
         is_null,
         *j);
       i.index_null = is_null;
     }

     // value
     //
     {
       bool is_null (false);
       std::size_t cap (i.value_value.capacity ());
       sqlite::value_traits<
           value_type,
           sqlite::id_blob >::set_image (
         i.value_value,
         i.value_size,
         is_null,
         v);
       i.value_null = is_null;
       grew = grew || (cap != i.value_value.capacity ());
     }

     if (grew)
       i.version++;
   }


Zitat von Boris Kolpackov <boris at codesynthesis.com>:

> Hi Christian,
>
> c.sell at byterefinery.de <c.sell at byterefinery.de> writes:
>
>> I have a simple std::vector<QImage> collection mapping which is controlled
>> by a section.
>
> We had a few bugs fixed in the section implementation. Does everything work
> if you get rid of the section?
>
> Boris





More information about the odb-users mailing list