Bill Gorder wrote:
but also show all the related colors.
Sorry I am not following you. You might need to give more details of what you mean by all related colors. Your query clearly states WHERE cl.name = "red". Why would you expect to get others?
I want to search for ALL the favourite objects that CONTAIN the color red. Now I have it the way I mentioned and it brings only color"red".
When a favourite object with id = 5 has colors = [red, green, yellow] and I search for favourite item with color "red", now I get the object with id =5 and colors = [red]. I want to get the full list of colors, object id = 5, colors = [red, green, yellow].