[odb-users] Containers of containers not supported in 2.5.0

Boris Kolpackov boris at codesynthesis.com
Mon Nov 6 08:16:41 EST 2023


Jarryd Beck <jarryd.beck at akunacapital.com> writes:

> One piece of our code which is working fine with odb 2.4.0 fails to
> compile in 2.5.0 with:
> schema/expiration_parameters.h:1487:29: error: containers of containers
> not supported
> 
> We have some structs that have vectors in them, and those types themselves
> appear in a vector.
> 
> Is this no longer supported, or is there something I need to do to make
> this work?

ODB 2.4.0 does not support nested containers (2.5.0 has basic/manual support;
see the NEWS file for details). I believe 2.4.0 did not check for containers
of containers in certain cases, which we fixed in 2.5.0. And this is the
reason for the error.

I suggest that you check if you got any database schema objects for the
nested vectors in question (a container is normally mapped to a table).
If you didn't, then that means 2.4.0 simply ignored them. To get the
same behavior in 2.5.0 you will need to mark them as transient with
a pragma:

https://www.codesynthesis.com/products/odb/doc/manual.xhtml#14.4.11



More information about the odb-users mailing list