[odb-users] Help is need with odb::vector Binary Type for PostgreSQL
Alain-Serge Nagni
asnagni at yahoo.com
Sat Dec 9 08:20:28 EST 2017
Hi there,
We have a Classe with a std::vector as a data member, std::vector<std::uint8_t> , and for performance reason we would like to migrate to odb::::vector<std::uint8_t>. Do anyone knows how to perform that switch? Per the documentation it should be a drop and replacement. We are using PostgreSQL database. We did try and we are having some issues at run time. This is the class and the data member declaration:
#pragma db object
Class CPhotos
{
….
….
….
….
#pragma db type (“BYTEA")
std::vector<std::uint8_t> m_imageBytes;
}
When we change std::vector<std::uint8_t> m_imageBytes to : odb::vector<std::uint8_t> m_imageBytes;
At run time when we try to access the database we have an error. This is the error :
42P01: ERROR: relation "CPhotos_imageBytes" does not exist
LINE 1: ...Bytes"."index", "CPhotos_imageBytes"."value" FROM "CPhotos_i…
Thank you for your help,
Alain-Serge
More information about the odb-users
mailing list