Skip to content

Commit 8575318

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents e24da03 + 83587c2 commit 8575318

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 1.1.2
9+
* Add support for loading nil dates
10+
11+
## 1.1.1
12+
* Allow `binary_id` fields to be nil
13+
14+
## 1.1.0
15+
* Add support for Ecto 1.11
16+
817
## 1.0.0
918

1019
* Introduce support for Ecto 3

lib/mongo_ecto.ex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,10 @@ defmodule Mongo.Ecto do
453453

454454
defp load_time(time), do: time
455455

456+
defp load_date(nil) do
457+
{:ok, nil}
458+
end
459+
456460
defp load_date(date) do
457461
{:ok, date |> DateTime.to_date()}
458462
end
@@ -475,6 +479,8 @@ defmodule Mongo.Ecto do
475479
:error
476480
end
477481

482+
defp load_objectid(nil), do: {:ok, nil}
483+
478484
defp load_objectid(_arg), do: :error
479485

480486
@impl true
@@ -573,6 +579,7 @@ defmodule Mongo.Ecto do
573579
ArgumentError -> :error
574580
end
575581

582+
defp dump_objectid(nil), do: {:ok, nil}
576583
defp dump_objectid(_), do: :error
577584

578585
@impl Ecto.Adapter.Schema

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule Mongo.Ecto.Mixfile do
22
use Mix.Project
33

44
@source_url "https://github.com/elixir-mongo/mongodb_ecto"
5-
@version "1.1.0"
5+
@version "1.1.2"
66

77
def project do
88
[

0 commit comments

Comments
 (0)