When performing a DQL query such as:
SELECT u AS user, t AS transaction
FROM Model\User u
JOIN Model\Transaction t WITH t.user = u
You get alternating rows of results, such as:
['user' => Model\User(1)]
['transaction' => Model\Transaction(1)]
['transaction' => Model\Transaction(2)]
['user' => Model\User(2)]
['transaction' => Model\Transaction(3)]
['transaction' => Model\Transaction(4)]
['transaction' => Model\Transaction(5)]
Is it possible to get the result the SQL way, like:
['user' => Model\User(1), 'transaction' => Model\Transaction(1)]
['user' => Model\User(1), 'transaction' => Model\Transaction(2)]
['user' => Model\User(2), 'transaction' => Model\Transaction(3)]
['user' => Model\User(2), 'transaction' => Model\Transaction(4)]
['user' => Model\User(2), 'transaction' => Model\Transaction(5)]
It would be much easier to deal with than alternating objects.
NEW
keyword is only for scalars? – Dinny