I want to use Neos\Party\Domain\Model\ElectronicAddress in my project as a collection for a user. In this case one address could be “used” by several users (i.e. “info@domain.tdl”).
Now I need an implementation for a repository ElectronicAddressRepository.
Of course a “findAll()” fails: Call to a member function findAll() on null.
Is it possible to access the according database table (neos_party_domain_model_electronicaddress) without a custom SQL and use “normal” magic calls?
There should actually be no problem with creating a ElectronicAddressRepository extending Neos\Flow\Persistence\Repository, since ElectronicAddress is a normal Flow Entity, BUT:
I’m a bit in doubt you actually want to directly query the electronic addresses as an own Aggregate, so maybe you can just explain a bit more what you actually want to achieve.
From what you wrote in your first two sentences, this would simply be solved by creating a ManyToMany relation between your User and ElectronicAddress.