#54057Recursive validation validates too deep
Description
Hello Extbase-Team,
I have 2 Domainmodels: Event and Day. It’s a MM-Relation. One Event can be at several days and one day there can be several events. Thats why I have defined event.days as LazyObjectStorage and day.events as LazyObjectStorage.
I have debugged the Validator-API and found out that the loop over event.days needs nearly a second.
It validates my event -> days -> all related events incl. my event -> days -> all related events incl. my event -> days -> and so on. Somewhere after many hundreds of loops the validator breaks and returns a valid Result-Object, but all previous validated properties (before days, like: title, eventStart, …) get lost.
So maybe it would be good to have a cache for already validated objects. They all have a unique identifier spl_hash. So in my opinion it should be possible to implement such a cache.
What do you think about it?
Stefan
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.