I keep running into this issue, I may have posted a question about it before tbh, but I still don't have a good solution.
I have some base entities, e.g. some fish.
Each fish is a member of a "school" (group) of fish.
Each school is an entity in its own right.
Now, the problem is that many of the systems that work on the schools, need access to the data that is contained in the individual fish entities.
The one hack I use so far is creating a school-component that contains an array of the individual fish components needed by the school-system.
This is not pretty, doesn't feel right, and as far as I can see it kills the "modularity" benefit of using an ECS. A fish now must have a specified component or the school system won't compile, as opposed to just not processing the entity.
Is there maybe a better way of doing this?