[odb-users] Composite pattern (not composite value) with extra
pointer to a child
Alexandre Pretyman
alexandre.pretyman at gmail.com
Mon Mar 16 23:04:07 EDT 2015
Thank you Boris and sorry about the noise.
On 16 March 2015 at 09:23, Boris Kolpackov <boris at codesynthesis.com> wrote:
> Hi Alexandre,
>
> Alexandre Pretyman <alexandre.pretyman at gmail.com> writes:
>
> > So it seems that for this scenario odb must be part of wiring of
> > the object pointers.
>
> Quoting from Chapter 6, "Relationships":
>
> "When persisting or updating an object containing a pointer to another
> object,
> the pointed-to object must have a valid object id. This, however, may not
> always be easy to achieve in complex relationships that involve objects
> with
> automatically assigned identifiers. In such cases it may be necessary to
> first persist an object with a pointer set to NULL and then, once the
> pointed-to object is made persistent and its identifier assigned, set the
> pointer to the correct value and update the object in the database."
>
> Boris
>
--
Alexandre Pretyman
More information about the odb-users
mailing list