[TYPO3-mvc] 6.2: How to debug recursive validation
g4-lisz at tonarchiv.ch
g4-lisz at tonarchiv.ch
Sun Jun 8 08:56:23 CEST 2014
Hi
I know i know... you see my old code from 4.6 below, just as a sample.
Changeing this to object manager ->get(..) was the first thing i did for
6.2.x
So the issue is something else: What do I have to return from the
repository to silence the "given subject was not a collection." error?
Or is there a better way to get the children ordered by a certain
attribute, without using the repository ?
Cheers,
Till
On 06/07/2014 01:24 PM, Helmut Hummel wrote:
> Hi!
>
> On 06.06.14 16:04, g4-lisz at tonarchiv.ch wrote:
>
>> $repository = new
>> Tx_Hplusinfo_Domain_Repository_MessungRepository();
>> return $repository->findByKlinik($this);
>> }
>
> Never *ever* instantiate objects with makeInstance or new operator,
> especially do not do so for singleton objects.
>
> Instead use the object manager to create the object so that all
> dependiencies will be injected into the object.
>
> You can get access to the object manager by dependency injection.
>
>> This worked in 4.6.
>
> There was a compatibility layer if someone nevertheless used new or
> makeInstance to create repository objects, which has now been removed.
>
>
> Kind regards,
> Helmut
>
More information about the TYPO3-project-typo3v4mvc
mailing list