[odb-users] Circular relation problem with external file mapping
Romain Gros
grosr.romain at gmail.com
Tue Jul 23 03:42:19 EDT 2013
Hi Boris,
I'll try to make QuestStep a composite value type when I have some time.
But we have a lot of object organized like that, because of the protobuf,
and I'm not sure we can do this for everything !
Moreover, I really want to learn how your ORM work, so if you have some
time to tell me about the other way, I would appreciate knowing it !
Regards,
2013/7/22 Boris Kolpackov <boris at codesynthesis.com>
> 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