Was trying to build schemas for an existing set of tables using Ecto 2.1, in a Phoenix 1.3.0 app.
Example:
defmodule Book do
use Ecto.Schema
schema "books" do
field :title, :string
field :owner_ids, {:array, :integer}
field :borrower_ids, {:array, :integer}
field :published, :boolean
end
end
On the console when I do Book |> first |> Repo.one
, I see the owner_ids
are printed properly ["29"]
, but the borrower_ids
shows '$'. Verified using psql
that borrower_ids for that row in the table does have a list of values in the table, exactly like the owner_ids
column.
All other columns in the table print just fine. Anything I am missing here?
Update: Rails/ActiveRecord 5.1.4 was able to retrieve this table and row just fine.