Inject multiple rows from second table as an array in the original query

Hello! Forgive my wording if anything is wrong as I am pretty new to Elixir.

I have transactions and transfers tables. The relation is transactions can have many transfers based on transaction.id (but transactions may also not have any transfers).

How would I go about running an ecto.query to get all the transfers (as an array) for a given transaction.id and add include it as an array in the transaction query?

EDIT 1
Here is my current query, but token_transfers is only a single item and not an array:

query =
      from(
        t in Transaction,
        inner_join: b in assoc(t, :block),
        join: tt in TokenTransfer,
        on: tt.transaction_hash == t.hash,
        order_by: [{^options.order_by_direction, t.block_number}],
        limit: ^options.page_size,
        offset: ^offset(options),
        select:
          merge(map(t, ^@transaction_fields), %{
            block_timestamp: b.timestamp,
            confirmations: fragment("? - ?", ^max_block_number, t.block_number),
            token_transfers: tt,
          })
      )

EDIT 2
This is what I am trying to achieve. Also, please note that there may not always be a corresponding token_transfer for every transaction.hash.

[
  transaction: {
     hash: 1,
     token_transfers: [
       {transaction_hash: 1, ...},
       {transaction_hash: 1, ...},
       {transaction_hash: 1, ...}
     ]
  },
  transaction: {
     hash: 2,
     token_transfers: [
       {transaction_hash: 2, ...},
       {transaction_hash: 2, ...},
       {transaction_hash: 2, ...}
     ]
  },
  transaction: {
     hash: 3,
     token_transfers: []
  }
]

Could you please show us the schema definition for both?

# Transaction schema
@primary_key {:hash, Hash.Full, autogenerate: false}
  schema "transactions" do
    field(:block_number, :integer)
    field(:cumulative_gas_used, :decimal)
    field(:error, :string)
    field(:exchange_rate, Wei)
    field(:gas, :decimal)
    field(:gas_price, Wei)
    field(:gas_used, :decimal)
    field(:index, :integer)
    field(:internal_transactions_indexed_at, :utc_datetime_usec)
    field(:input, Data)
    field(:nonce, :integer)
    field(:r, :decimal)
    field(:s, :decimal)
    field(:status, Status)
    field(:v, :integer)
    field(:value, Wei)

    timestamps()

    belongs_to(:block, Block, foreign_key: :block_hash, references: :hash, type: Hash.Full)
    has_many(:forks, Fork, foreign_key: :hash)

    belongs_to(
      :from_address,
      Address,
      foreign_key: :from_address_hash,
      references: :hash,
      type: Hash.Address
    )

    has_many(:internal_transactions, InternalTransaction, foreign_key: :transaction_hash)
    has_many(:logs, Log, foreign_key: :transaction_hash)
    has_many(:token_transfers, TokenTransfer, foreign_key: :transaction_hash)

    belongs_to(
      :to_address,
      Address,
      foreign_key: :to_address_hash,
      references: :hash,
      type: Hash.Address
    )

    has_many(:uncles, through: [:forks, :uncle])

    belongs_to(
      :created_contract_address,
      Address,
      foreign_key: :created_contract_address_hash,
      references: :hash,
      type: Hash.Address
    )

    belongs_to(
      :exchanger_address,
      Address,
      foreign_key: :exchanger_address_hash,
      references: :hash,
      type: Hash.Address
    )

    belongs_to(
      :token_address,
      Address,
      foreign_key: :token_address_hash,
      references: :hash,
      type: Hash.Address
    )

    belongs_to(
      :token_transfer_receiver_address,
      Address,
      foreign_key: :token_transfer_receiver_address_hash,
      references: :hash,
      type: Hash.Address
    )
  end

# Transfer schema
@primary_key false
  schema "token_transfers" do
    field(:amount, :decimal)
    field(:block_number, :integer)
    field(:log_index, :integer, primary_key: true)
    field(:token_id, :decimal)
    field(:pay_by_token, :boolean)

    belongs_to(:from_address, Address, foreign_key: :from_address_hash, references: :hash, type: Hash.Address)
    belongs_to(:to_address, Address, foreign_key: :to_address_hash, references: :hash, type: Hash.Address)

    belongs_to(
      :token_contract_address,
      Address,
      foreign_key: :token_contract_address_hash,
      references: :hash,
      type: Hash.Address
    )

    belongs_to(:transaction, Transaction,
      foreign_key: :transaction_hash,
      primary_key: true,
      references: :hash,
      type: Hash.Full
    )

    has_one(:token, through: [:token_contract_address, :token])

    timestamps()
  end

Is this sufficient? @NobbZ