Yes you can, he called pragmas.
In another file you need to write
#pragma db object(basic_object)
#pragma db member(basic_object::_id) id
Then you must tell the odb compiler where to look. You can do this by adding
#ifdef ODB_COMPILER
#include "other_file.hxx"
#endif
to the source file OR
using
- odb-epilogue '#include "other_file.hxx"'
as an odb compiler option.
basic_object, : _id .
odb :
private:
friend class odb::access;