[odb-users] Issue getting relashonships off the ground

Boris Kolpackov boris at codesynthesis.com
Sat Sep 20 04:21:06 EDT 2014


Hi Brian,

Brian Bourke-Martin <brianbourke75 at gmail.com> writes:

> /usr/local/include/odb/database.ixx:570:54: error: no matching function for
> call to ‘odb::object_traits_impl<Inspection,
> (odb::database_id)1u>::find(odb::database&, const id_type&)’

If you look at line 570 in database.ixx, just above it you will see
this comment:

// Compiler error pointing here? Perhaps the object doesn't have the
// default constructor?
//

So your problem is the fact that class Inspection doesn't have the
default constructor. Object without default constructors cannot be
used in relationships.

Seeing that you have a circular relationship, you may also find
Section 6.3, "Circular Relationships" in the ODB manual relevant.

Boris



More information about the odb-users mailing list