[odb-users] Pointer to a objects list.
Xavier Monset
xavier.monset at gmail.com
Wed Aug 12 10:32:08 EDT 2020
Hi !
I have two classes 'Groupe' and 'Consignes'. Groupe own a list of Consignes.
#include <odb/core.hxx>
#pragma db object
class Groupe
{
private:
friend class odb::access;
#pragma db id auto
unsigned long id_;
map<int, Arrets* > liste_arrets;
StatsEcPhGroupe *messtatsEcPh = new StatsEcPhGroupe();
StatsTempsGroupe *mesStatsTemps = new StatsTempsGroupe();
StatsVolumeGroupe *mesStatsVolume = new StatsVolumeGroupe();
* list<Consignes_Injection_Exterieure*> *mesConsignesInjectionExterieure
= new list<Consignes_Injection_Exterieure*>;*
public:
bla bla bla
}
the line " list<Consignes_Injection_Exterieure*>
*mesConsignesInjectionExterieure = new
list<Consignes_Injection_Exterieure*>; " seems to not be right for odb. I
have this error :
error: unable to map C++ type '::std::list<
::Consignes_Injection_Exterieure* >*' used in data member
'mesConsignesInjectionExterieure' to a MySQL database type
info: use '#pragma db type' to specify the database type
How should I handle it ?
Thanks a lot.
Xavier.
More information about the odb-users
mailing list