[odb-users] Circular relation problem with external file mapping
Boris Kolpackov
boris at codesynthesis.com
Mon Jul 22 04:10:47 EDT 2013
Hi Romain,
Romain Gros <grosr.romain at gmail.com> writes:
> To be clear : Quest::steps_ is a std::vector<QuestStep>, and not a
> std::vector<QuestStep*>. And it seems that it's the problem here!
>
> Is there a way to make a to-many relationship with this container ?
Ok, so Quest contains rather than references QuestStep's. A cleaner
way to map this would be to make Quest an object while QuestStep --
a composite value type. You could then make QuestStep::quest_ a
transient back pointer (could also set them, for example, in the
post_load callback).
Let me know if you still want to make QuestStep a separate object
for some reason. There is a way, it is just quite involved.
Boris
More information about the odb-users
mailing list