[odb-users] Assertion fails in mysql/statement.cxx

Boris Kolpackov boris at codesynthesis.com
Thu Dec 12 13:02:13 EST 2013

Hi Scott,

Scott Deerwester <scott.deerwester at gmail.com> writes:

> What do I do if I need to get an ordered list of the ChildClass ID's
> that are associated with a ParentClass object? That was the motivation
> for using a QMap. I was using a QMap iterator, but QSet doesn't do that.

With std::set you can provide a custom comparator to order the
objects using IDs rather than pointers (second template argument
to std::set). This way iteration over set will implicitly give you
an ordered list of IDs.

Unfortunately, QSet doesn't seem to provide this functionality and
I am not sure if any other Qt container supported by ODB does.


More information about the odb-users mailing list