💾 A database layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.
foreach ($explorer->table('book') as $book) {
$tags = $book->related('book_tag')->select("tag.*")->fetchPairs('name');
}
does not return tags for all books if StaticConventions is used. It looks like the problem occurs if one tag is used with multiple books. Tags are returned only for one of those books.
Interesting is that if particular column is selected from tag table, it works fine:
foreach ($explorer->table('book') as $book) {
$tags = $book->related('book_tag')->select("tag.name")->fetchPairs('name');
}
Version: 3.1.7
Bug Description
Code
does not return tags for all books if StaticConventions is used. It looks like the problem occurs if one tag is used with multiple books. Tags are returned only for one of those books.
Interesting is that if particular column is selected from
tag
table, it works fine:Expected Behavior
Tags for all books should be returned.