I’m passing a list of maps and I’m trying to run them through a insert_all
in Ecto.multi
:
def create_jobs(%{jobs: jobs} = attrs) do
insert_jobs =
Ecto.Multi.new()
|> Ecto.Multi.insert_all(:jobs, Job, jobs)
|> Repo.transaction()
When I try and save this, I get:
value
"3310"for
Talent.JobManagement.Schemas.Job.owner_idin
insert_alldoes not match type :id
I thought strings were valid as an :id.
The model for Job has:
belongs_to(:owner, User)
Any ideas?