You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @zookzook, thanks one more time for maintaining this library and merging my contributions!
I'm not sure yet what's the use for the types when defining a module with use Mongo.Collection. Is it just for documentation/humans?
There doesn't seem to be any form of validation, nor does it seem to influence the default encoding/decoding process (and I'm okay with that).
Nonetheless, I noticed that calling SomeCollection.__collection__(:types) includes some info about a document attribute set with embeds_many, but missed a similar attribute set with embeds_one.
In embeds_many the type is derived as type = unquote(Macro.escape({{:., [], [mod, :t]}, [], []})). I'm not sure what would be expected for the embeds_one case, any advice?
The text was updated successfully, but these errors were encountered:
Hi @zookzook, thanks one more time for maintaining this library and merging my contributions!
I'm not sure yet what's the use for the types when defining a module with
use Mongo.Collection
. Is it just for documentation/humans?There doesn't seem to be any form of validation, nor does it seem to influence the default encoding/decoding process (and I'm okay with that).
Nonetheless, I noticed that calling
SomeCollection.__collection__(:types)
includes some info about a document attribute set withembeds_many
, but missed a similar attribute set withembeds_one
.elixir-mongodb-driver/lib/mongo/collection.ex
Lines 888 to 894 in 6071f18
elixir-mongodb-driver/lib/mongo/collection.ex
Lines 905 to 911 in 6071f18
In
embeds_many
the type is derived astype = unquote(Macro.escape({{:., [], [mod, :t]}, [], []}))
. I'm not sure what would be expected for theembeds_one
case, any advice?The text was updated successfully, but these errors were encountered: