[TYPO3-50-general] Database Persistence / Transaction Support

Duo Zheng duozheng at gmail.com
Sat Aug 15 23:50:33 CEST 2009


> Huh? Nested aggregates? Not in DDD...do you mean Entities?

Thanks for the correction, but yes Entities was the true intention.

> The kind of relationships you're talking about are usually handled  
> by an
> Unit of Work in the persistence layer/ORM.

Thanks for the advice. It does make sense for the Unit of Work to  
handle this. This kind of makes everything be wrapped in a transaction  
it seems though. Since it is so deep down in the layer, this is all  
"automatic". Not a huge issue for me at least, but some may question  
this I think.

Let me take a look at existing ORM's and see how their implementation  
works or if it even supports this.

I didn't find any information about this, but is TYPO3 v5 intended to  
work with other DB's?

Thanks Again

On Aug 14, 2009, at 8:13 PM, Nino Martincevic wrote:

> Duo Zheng schrieb:
>> If Aggregate roots and Aggregates are connected via "Foreign Key"
>> relations  in the DB backend, are there already methods in place to
>> handle the inserts since the "Auto Increment ID" is required for
>> nested Aggregates? The Persistent Manager handles the commits so I
>> wanted to clarify this. (I hope that was clear)
>
> Huh? Nested aggregates? Not in DDD...do you mean Entities?
>
>> For the sake of the example this is all one request / transaction:
>> * Blog gets created
>> * First post gets created, but it needs the Blog Id from the just
>> created Blog.
>
> Question to ask here: who creates the post?
>
> If the boundary for this operation is the Blog AR, then you have the
> relation already. Always think of aggregates as consistency  
> boundaries.
> ARs aren't a structural property of the domain model but a conceptual
> one. An object might be an Entity in one AR in one use case/context  
> and
> the AR itself in another one.
>
> From the original definition by Evans:
> "[ARs are] A cluster of associated objects that are treated as a unit
> for the purpose of data changes. ... . A set of consistency rules
> applies within the Aggregate's boundaries."
>
> The kind of relationships you're talking about are usually handled  
> by an
> Unit of Work in the persistence layer/ORM.
>
> Cheers!
> _______________________________________________
> TYPO3-project-5_0-general mailing list
> TYPO3-project-5_0-general at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-5_0-general



More information about the TYPO3-project-5_0-general mailing list