[odb-users] Circular relation problem with external file mapping

Romain Gros grosr.romain at gmail.com
Fri Jul 19 13:33:25 EDT 2013


Hi Boris !

Boris Kolpackov <boris at codesynthesis.com> writes:

>> #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
>*`.
>
>What are the types of the QuestStep::quest_ and Quest::steps_ data
>members? Based on your mapping, they should be pointers to objects
>of some sort.

The type of *QuestStep::quest_* is *::Quest**.
The type of *Quest::steps_* data members is *::QuestStep, *but it's not
pointer.

>> Now, when I try to compile, I got this error: `unable to map C++ type
>> '::QuestStep'`.
>
>That would normally mean that QuestStep is treated as a value rather
>than an object. What does the line that this error points to contain?
>And in the future always show what the error points too -- I have no
>way of knowing what it is!

This error points too the declaration of the member *Quest::steps_* in the
class declaration. Sorry for this oversight !

Thanks for the answer !


More information about the odb-users mailing list