How to use FindGroups multiple times #101
-
If you call FindGroups multiple times with different types in the same method, the previous results get changed. var groups1 = entitiesDB.FindGroups<Component>();
var groups2 = entitiesDB.FindGroups<Component2>(); group1 takes the value of group2. Shouldn't there be a more clear indicator that the return value is a singleton list? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
We unintentionally ran into this issue as well, but avoided it for now by reordering a couple of things. It would be good to improve how this is shown to the user |
Beta Was this translation helpful? Give feedback.
-
this was by design as I couldn't find a reason to call FindGroups multiple times. it would be nice to find a way to validate that it's used improperly. |
Beta Was this translation helpful? Give feedback.
-
also nothing stops us from adding an overload that accepts a |
Beta Was this translation helpful? Give feedback.
this was by design as I couldn't find a reason to call FindGroups multiple times.
remember that you can do
FindGroups<component, component2>
if you needed an intersection.If not, you need to use
QueryGroups
to do more complex operations with group sets .it would be nice to find a way to validate that it's used improperly.