--- In
domaindrivendesign <at> yahoogroups.com, "moffdub" <moffdub <at> ...> wrote:
>
> You're right, I'm probably not getting what your problem is. As I
> understand it:
>
> // ...some method in a different aggregate...
> {
> MixDesign mixForCalc = (new
> RepositoryLocator(...)).getMixDesignRepository().findByID(1874);
>
> Calibration calibrationForCalc =
mixForCalc.getCalibrationByCriteria(...);
>
> ... use calibrationForCalc here for something ...
> calibrationForCalc = null; // drop the reference
> }
>
> Are you referring to the problem of weak entity types in
> Entity-Relationship modeling? In other words, is Calibration's primary
> key is entirely dependent on MixDesign's primary key?
>
>
> --- In
domaindrivendesign <at> yahoogroups.com, "nichols_mike_s"
> <nichols_mike_s <at> > wrote:
> >
> > I don't understand how this resolves maintaining references to
> > internal entities in a different aggregate root?
> > Maybe I should clarify that I need to persist the 'which one' question
> > pertaining to the internal entities for consumption outside the
> > aggregate root...not just for a single operation.
> >
> >
> > --- In
domaindrivendesign <at> yahoogroups.com, "moffdub" <moffdub <at> > wrote:
> > >
> > > The edict about aggregates isn't as restrictive as it sounds.
> > >
> > > You generally can hold references to internal entities, as long as
> > > they are transient and don't last longer than one operation. Another
> > > technique I use is to allow only the aggregate root's repository to
> > > use the internal entity repository. The implication of this is that
> > > the references to internal entities is done via the aggregate root.
> > >
> > > Yet another technique is to return the internal entities as
immutable,
> > > if at all possible.
> > >
> > > --- In
domaindrivendesign <at> yahoogroups.com, "nichols_mike_s"
> > > <nichols_mike_s <at> > wrote:
> > > >
> > > > I have an entity 'Calibration' which is a variant entity under the
> > > > Aggregate 'MixDesign'. MixDesigns create calibrations and
> calibrations
> > > > are only valid as they represent a valuation based on mix design
> > > > properties. There is no such thing as a calibration without a mix
> > > design.
> > > >
> > > > I have other objects outside the mix design aggregate boundary
which
> > > > need to know which calibration is being used for their
calculation,
> > > > but DDD dictates that no references to inner variants are held.
> > > >
> > > > I have considered moving Calibration to be its own aggregate but
> this
> > > > is awkward since a calibration really only exists as a valuation
> from
> > > > a mix design.
> > > >
> > > > How have other people here dealt with this kind of
pseudo-aggregate
> > > > reference problem? I really don't want to implement a service to
> deal
> > > > with associations in the domain for something as simple as object
> > > > references.
> > > > Should I reference the calibration by some kind of business
key like
> > > > the Creation date (which is unique) or something?
> > > > thanks,
> > > > mike
> > > >
> > >
> >
>