It’s working now.
Thank @josevalim very much sorry for your lose time. on my small mistake.
I have read the ecto docs. I only understand only when putting primary_key and foreign_key we only put with has_many and belongs_to ones to make references across tables.
But in this case it’s only the composite key.
I apologize for this.
Dev.