[odb-users] Sections in view's result causes exception

Lukas Obermann obermann.lukas at gmail.com
Tue Dec 13 11:24:43 EST 2016

Hi there,

When I try to load a section from a result I get following exception:
section instance is not part of an object (section was copied?)

The code is like this:

odb::result<ODBView_Data> res(m_cdb.getDB()->query<ODBView_Data>(data_query));
for (odb::result<ODBView_Data>::iterator i = res.begin(); i != res.end(); i++) {
  m_cdb.getDB()->load(*(i->data), i->data->section_container);

where data is a std::shared_ptr<ODBData>, and ODBData is having different sections.

As the sections work without issues on other parts where I do not use Views I assume that this has something to do with the View.

Not sure what I am doing wrong. Any help is appreciated!


More information about the odb-users mailing list