[odb-users] cannot load image bytes through section

Andrew Cunningham odb at a-cunningham.com
Fri Dec 23 18:18:11 EST 2016


Christian,
There have been several fixes to 2.4.0 with regards to sections. Try the
latest 2.5.0a11

Andrew

On Fri, Dec 23, 2016 at 2:43 PM, Christian Sell <christian at gsvitec.com>
wrote:

> hello,
>
> I am using SQLite, and heres my mappping
>
> #pragma db type("BLOB") section(image_section)
> std::vector<unsigned char> image_data;
>
> heres the code:
>
> odb::ransaction tr(database->begin());
> database->load(*obj, obj->image_section);
>
> the data in the database is perfect, and it was written through the same
> mechanism. However, when loading, I get a correct size in
> image_data.size(), but the data inside image_data is garbage
>
> can anyone help?
> thanks, Christian
>
>


More information about the odb-users mailing list