KT Walrus Posted October 21, 2021 Share Posted October 21, 2021 My app uses a map table for mapping containers to items. I'm trying to implement having an item be contained in multiple containers. I've got this mostly working by adding an INNER join of the map table when calling getItemsWithPermission(). But, I now want to select other columns in the joined map table and on return from getItemsWithPermission(), I want to access the joined map table column data within my Item Class. How do I access the map.* column data? $joins[ 'map' ] = array( 'select' => 'map.*', 'from' => array( 'myapp_forum_topic_map', 'map' ), 'where' => array( 'myapp_topics.tid=map.topic_id AND ' . \IPS\Db::i()->in( 'map.forum_id', array_filter( $forumIds ) ) ), 'type' => 'INNER' ); return parent::getItemsWithPermission( $where, $order, $limit, $permissionKey, $includeHiddenItems, $queryFlags, $member, $joinContainer, $joinComments, $joinReviews, $countOnly, $joins, $skipPermission, $joinTags, $joinAuthor, $joinLastCommenter, $showMovedLinks ); Link to comment Share on other sites More sharing options...
Solution KT Walrus Posted October 21, 2021 Author Solution Share Posted October 21, 2021 (edited) I found the answer. All query data is available in the Item's constructFromData() function. Edited October 22, 2021 by KT Walrus IPCommerceFan 1 Link to comment Share on other sites More sharing options...
Recommended Posts