Ecto.Type warning

Hello Guys!
We are using EctoEnum heavily in our system, and we have many warnings similar to the one below. I couldn’t find a workaround for this. Maybe I am missing something, any help would be highly appreciated, thanks.

warning: function embed_as/1 required by behaviour Ecto.Type is not implemented (in module ResultStateEnum)
import EctoEnum
defenum(ResultStateEnum, fail: 0, pass: 1)

What version of EctoEnum are you using? (Those callbacks were added in 1.4.0.)

My version is 1.2

Try upgrading to 1.4, as that will give you the callbacks.

If for some reaon you can not, you could provide a macro in your code base that provides those callbacks and use that in combination with the use EctoEnum

The easiest by far will be to just upgrade the version of EctoEnum in mix.exs :slight_smile:

1 Like

Okay, thanks for your response. I will try it out and let you know!