Can we get some support over here?? Be a week since my first post and have only received one email from @web-johnny.
This N2N relationship stuff is completely broken for me now. Using the out-of-box filters was my last ditch effort to filter down my many-to-many tables (see link for original problem).
Using code below, then filtering on the fieldname, "Game", from the N2N relationship produces this error:
( ! ) Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1140 In aggregated query without GROUP BY, expression #2 of SELECT list contains nonaggregated column 'tmp.game_uses_item.ItemInstanceID'; this is incompatible with sql_mode=only_full_group_by' in F:\Programming\Web\FR\www\GroceryCrud\libraries\zendframework\zend-db\src\Adapter\Driver\Pdo\Connection.php on line 360
Code:
$crud->setTable('item');
$crud->setSubject('Item', 'Items');
//Define columns and order
$crud->columns(['Game', 'CodeName', 'ImagePath', 'Sound', 'ShortNameLanguageID', 'LongNameLanguageID', 'ItemType']);
$crud->requiredFields(['CodeName', 'ImagePath', 'Sound', 'ShortNameLanguageID', 'LongNameLanguageID', 'ItemType', 'Game']);
$crud->uniqueFields(['CodeName']);
$crud->defaultOrdering('CodeName', 'asc');
//Build relationship between games and items (make sure to hide reference fieldname, will add automatically before add & update)
$crud->setRelationNtoN('Game', 'game_uses_item', 'game', 'ItemID', 'GameID', 'game_shortcode', null);
//$crud->unsetFields(['Game']);
//Convert itemIDs into plain english (filter at end is to limit dropdown list to languages that are used by this game)
$crud->setRelation('ShortNameLanguageID','language','en');
$crud->setRelation('LongNameLanguageID','language','en');
