yassine
Invited_by_id` in `insert` does not match type :id (PowInvitation)
Hi everyone, i have a problem with powinvitation library and i wish if some one can help me.
So, i will explain my problem with screenshots:
*) create_user migration file:
*) add pow invitation migration file:
*) add organization id for user migration file:
*) create organization migration file:
And for the schemas, i have:
*) user schema:
*) organization schema:
but when i run it a got this problem:
Most Liked
thiagomajesk
I suspect that you are trying to save a string as an uuid. You should try using Ecto.UUID.dump!/1 to cast that value to a binary first. I had the same problem some time ago.
If that’s not the case (if you are using a changeset to cast the values for example), check if you field is actually an uuid/ binary_id as you seem to be trying to persist one.
PS.: Also, if possible, replace the screenshots with markup so the forum search can properly index it. This will make your post more accessible to other people searching for a similar solution.
Update: Seems that your user schema is setting @primary_key as uuid but you are not specifying a @foreign_key_type even though you are referencing the users table by the invited_by_id fk. Could you also check that please?
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance
















