Storing arrays/JSON in a model?


#1

Hey all!

I’m fairly new to Ember, but not so new to programming/JS in general. That said, I’m still figuring out the Ember way of doing things.

I’ve got a model that’s storing documents, and associated with those documents are tags. What’s the best way to go about storing those tags? Is there a way to just save those tags as an array in the document model? Or do I create a separate “tag” model and create a one-to-many relationship? Later on, I want to be able to find documents that have certain tags, so that’s my long-term goal.

Let me know the best way to go about this.

Thanks so much!