Open mrdotb opened 4 years ago
Hi, thank your for reporting this issue and providing an example.
updated_at
attribute should be the NaiveDateTime
everywhere, I'll look into your repo.
Hello, did you have the time to check ? I can dive in ?
@mrdotb PR is welcome
Hello. Is there any news about the correction of this bug?
@mrdotb @Faymir I made a PR, but if you need to fix this asap - you can write your own version of Waffle.Ecto.Definition
that would implement embed_as/1
to return :dump
value.
Honestly, it's quite sad that things like this bug are not being fixed in the elixir community for years... I wonder why. Because nobody stores filenames inside embeds? Maybe nobody uses this in production? Or everyone's using another lib for file uploading?
I guess not much people use it as embed. Glad you found the root cause. I tried a bit and I ended up not using waffle_ecto
and roll my own embedded schema.
Hello,
When I write some tests I found a weird behavior from
waffle_ecto
Theupdated_at
type return from insert differ from select. (NaiveDateTime
toString
) I did an example with phoenix since it happen when the data is inserted in postgres.Basically I got a embeds_many who use
Waffle.Ecto.Schema
In the test result the updated_at field in the embeds_many is a NaiveDateTime on insert and a String on select Is this behavior expected ? (since it's stored in text format and not timestamp)
Thanks for your time.