I have db schema like this:
I've succeded migration for
city table data with
statement => "SELECT `item`.`id`, `item`.`title`, `item`.`description`, `city`.`name` AS `city` FROM `item` LEFT JOIN `city` ON `city`.`id` = `item`.`city`"
So now I can search
items by city.
But also there are many-to-many associations:
So, for instance,
item can be associated with few
colours, and it have to be searchable by
Record could be like:
city | title | colours =======|=======|================== London | cat | red, green, blue Paris | cat | red, yellow
And there should be availability to search for cats in London, or red cats.
Any help would be appreciated!