Answer the question
In order to leave comments, you need to log in
Is there an alternative to EAV for this situation?
There is an essence - a game, images belong to it. There are certain categories of these images: Poster, screenshots, wallpaper, art, header image and the like. I want to do it this way: Using eav, store the category name and id of the images and just give the necessary pictures via __get, selecting the ones you need from the collection by id. But here, at least, there is a problem with storing the id group in a string through a separator, in my opinion, this is not a very correct solution, at least due to the fact that fk cannot be hung. How to do it better?
Answer the question
In order to leave comments, you need to log in
It seems to me that you are digging deeply, and sideways. Here you have a normal relay form, the image stores id, owner_id, type_id and link, well, plus what you need. In the table of types - id and name, in the owner, of course, everything that you need to store there about the object.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question