Update an mnesia record in an mnesia table of type bag
96 views
Skip to first unread message
Federico Carrone
unread,
May 23, 2016, 11:22:02 AM5/23/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to elixir-l...@googlegroups.com
Hi,
I can't find an easy way of updating a mnesia record in an mnesia table of type bag. When I do a write of the new record it adds a new record instead of updating it. I am using Amnesia to work with mnesia. Any idea of what I can do?
Regards,
Federico.
Robert Virding
unread,
May 23, 2016, 3:49:31 PM5/23/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to elixir-lang-talk
Why are you using a type bag? The whole purpose of bag is to allow multiple elements with the same key. It will only not add a new element if it is equal to an existing one.