[odb-users] Circular relation problem with external file mapping
Romain Gros
grosr.romain at gmail.com
Thu Jul 18 16:13:34 EDT 2013
Hello,
I am trying to use ODB with the Google Protocol Buffer library.
So far so good, I can map object with relation and everything is working
well.
Now, I am trying to make a one-to-many relation with two objects : *Quest*and
*QuestStep*.
Here is a little bit of the `Quest.hxx` file, which contains the two
definitions :
#pragma db object(QuestStep) definition
#pragma db member(QuestStep::quest_) get(get_quest)
set(set_allocated_quest) not_null column("idquest")
#pragma db object(Quest) definition
#pragma db member(Quest::steps_) get(get_steps) set(set_steps)
value_not_null inverse(quest_)
`get_steps` returns a `::google::protobuf::RepeatedPtrField< ::QuestStep
>*`.
Now, when I try to compile, I got this error: `unable to map C++ type
'::QuestStep'`. But the *QuestStep *should be defined just before, right ?
Is this a problem related to the external file declaration ?
I also tried with a *std::vector*, but I got the same error !
Do you know how could I fix this ? I'm kinda stuck here...
Thanks a lot!
Cordially,
Romain Gros
More information about the odb-users
mailing list