Open markshiz opened 8 years ago
Well that's odd, it's calling dump with {{2016, 9, 3}, {0, 0, 0, 0}}
instead of a DateTime. I can add an overload to dump which just takes in such a date/time tuple and passes it through, but I wonder what that just started happening. What version of Ecto are you using?
I'm on the latest stable version, 1.1.8
My tests show this is now working in the latest release, 1.1.3. I'll close this for now, but please reopen if you are still encountering issues. Thanks!
I just updated timex_ecto
and elixir
to latest versions, but I'm still running into the same issue.
** (exit) an exception was raised:
** (Ecto.ChangeError) value `{{2016, 9, 14}, {0, 0, 0, 0}}` for `App.Session.expiration` in `insert` does not match type Timex.Ecto.DateTime
(ecto) lib/ecto/query/planner.ex:33: anonymous fn/6 in Ecto.Query.Planner.fields/4
(stdlib) lists.erl:1262: :lists.foldl/3
(ecto) lib/ecto/query/planner.ex:21: Ecto.Query.Planner.fields/4
(ecto) lib/ecto/repo/schema.ex:449: Ecto.Repo.Schema.dump_changes/5
(ecto) lib/ecto/repo/schema.ex:77: anonymous fn/11 in Ecto.Repo.Schema.do_insert/4
(ecto) lib/ecto/repo/schema.ex:477: anonymous fn/3 in Ecto.Repo.Schema.wrap_in_transaction/9
(ecto) lib/ecto/pool.ex:292: Ecto.Pool.with_rollback/3
(ecto) lib/ecto/adapters/sql.ex:582: Ecto.Adapters.SQL.transaction/8
(ecto) lib/ecto/pool.ex:244: Ecto.Pool.outer_transaction/6
(ecto) lib/ecto/adapters/sql.ex:551: Ecto.Adapters.SQL.transaction/3
Dependency Current Latest Requirement
phoenix 1.1.6 1.1.6 ~> 1.1.6
phoenix_ecto 2.0.2 2.0.2 ~> 2.0.2
phoenix_html 2.5.1 2.5.1 ~> 2.5.1
phoenix_live_reload 1.0.5 1.0.5 ~> 1.0.5
postgrex 0.11.1 0.11.1 >= 0.0.0
timex 2.1.6 2.1.6 ~> 2.1.6
timex_ecto 1.1.3 1.1.3 ~> 1.1.3
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Elixir 1.2.6
@markshiz Ok, I've reopened this. What version of Ecto are you running?
ecto is the latest non-beta, 1.1.8
Getting the following error:
With the following model:
Here are my versions