[odb-users] Use of postgresql array mapping for native views

Boris Kolpackov boris at codesynthesis.com
Mon Apr 22 12:02:43 EDT 2019


Lisa Fiedler <lfiedler at informatik.uni-leipzig.de> writes:

> value_traits<std::vector<u_int64_t>, id_string>
>
> [...]
>
> typedef std::vector<u_int64_t> id_vector;
> #pragma db value(id_vector) type("BIGINT[]")

This doesn't make much sense to me: you are providing a mapping
traits for vector<u_int64_t> to string but then trying to use
BIGINT[] as the database type?

I suggest that you read through this article and see if it
clarifies things:

https://www.codesynthesis.com/~boris/blog/2012/07/18/custom-database-to-cxx-type-mapping-in-odb/



More information about the odb-users mailing list