Delete from table with no primary key

321 views
Skip to first unread message

Justin Schneck

unread,
Aug 11, 2014, 10:47:19 PM8/11/14
to elixi...@googlegroups.com
I have a join table that I created with no primary key. users_roles. it has two columns of uuid's. I am trying to use Repo.delete but I am getting the error

** (Ecto.NoPrimaryKey) model `Elixir.Proj.Db.Models.UserRole` has no primary key

Is there a way around this or do I need to add my primary key to my join table.

José Valim

unread,
Aug 12, 2014, 3:35:43 AM8/12/14
to Justin Schneck, elixi...@googlegroups.com
Repo.delete_all and pass it a query?



José Valim
Skype: jv.ptec
Founder and Lead Developer


--
You received this message because you are subscribed to the Google Groups "elixir-ecto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-ecto...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages