I have a poll functionality that uses custom post type & taxonomy to define actual polls.
CPT: poll_entity
Taxonomy: poll_year
Now I need to store votes on user to highlight on voting page.
I'm saving as serialized array to voted_for
meta key.
Currently it looks like:
[
2020 => [1, 2, 5] // (id of chosen poll custom post / voting entity),
2021 => [2, 4, 5]
]
While it's working fine, I'm wondering if it's a bad practice and if there is a better way to store hierarchies like that?