[TYPO3-mvc] ValueObject against Entity

Claus Due claus at wildside.dk
Wed Sep 5 09:03:41 CEST 2012


Hi Stefan,

Thank you so much for this thorough investigation!

Now, unfortunately, I have huge problems seeing the benefit of ValueObjects:

Compared to a UID relation that sort of multicolumn fulltext querying has truly horrible performance :/

I'm not sure I'll every use those objects. It doesn't seem to make much sense?

Cheers,
Claus

On Sep 5, 2012, at 7:33 AM, Stefan Frömken <firma at sfroemken.de> wrote:

> Am 04.09.2012 17:22, schrieb Claus Due:
>> Hi Stefan,
>> 
>>> hmmm...works perfect in my sample extension. I have only one domainmodel registered as value object in my extension and marked it as AggregateRoot. It works without any problems.
>> 
>> Also if your ValueObject has properties which are relations to other DomainObjects…? As far as I know that should not be possible. But I could be wrong about that.
>> 
>> Cheers,
>> Claus
>> 
> 
> Hello Claus,
> 
> I'm sure it will work. Also with related Domainmodels. The problem is, that everywhere you only find a description how it should work with the eyes of DDD. But there is no description about what TYPO3 does!
> 
> Yesterday I have discussed this problem over 3 hours with the Extbase-Team. I have searched many documentations regarding this problem and read many lines of code within the extbase extension. I have created a little extension which constist only of ONE domainmodel (category) as value object with list, show, edit and new actions.
> 
> Here is a result:
> 
> Create a new category with the name "CDs".
> --> It works. "CDs" appears in the list action.
> 
> Create a new category with the name "Cars".
> --> It works. "Cars" appears in the list action.
> 
> Create a new category with the name "CDs" AGAIN.
> --> It doesn't work! "CDs" was not added to the list and there is no additional entry in the database.
> 
> Create a new category with the name "cds".
> --> It doesn't work! "cds" was not added to the list BUT the already existing record "CDs" was renamed to "cds".
> 
> With this informations I searched again in the sourcecode of extbase and found out, that extbase doen not search for value objects with help of the uid. NO...it searches for the value object by a query which keeps all cols in it:
> 
> SELECT * FROM myTable WHERE street="myStreet" AND zip="12345" AND city="munich".
> 
> THAT is the difference between Entity and value object!
> 
> Stefan
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list