Listing associated IDs during a Controller query in CakePHP 3
Yesterday I looked into adding a key-value pair such as "tag_ids": [1, 2, 3] to a JSON object returned by a serialized CakePHP view, for Bookmarks belonging to many Tags. My solution produces the desired result, but involves the execution of a new database query for every bookmark, on top of the one that retrieved the record in the first place. This is not … [Read more…]