Hi, all, I’m looking at an entity that holds some numbers, and then processes those numbers using a function named by another attribute of the entity. So, like:
----F [component ref]
So, if “A” is 9, and “B” is 7, and F is “Sum”, if you ask for a result for this entity, you’d get 16. If F were switched to “Product”, you’d then get 63. If “Different”, you’d get 2, and so on.
The person who designed the entity made F a component, and that seems inappropriate to me. I can’t see it hurting anything but it seems wrong.
My reasoning is that the docs for component say they’re for entities that don’t exist outside of their parent entity, like line items on an invoice. While it’s true that the functions themselves are meaningless without a parent entity, the same functions are used in many different entities. I.e., lots of entities will use the same “Sum” function, and lots will use “Product”, and so on. You’d never delete a function even if no entities were currently referencing it.