Update an mnesia record in an mnesia table of type bag

93 views
Skip to first unread message

Federico Carrone

unread,
May 23, 2016, 11:22:02 AM5/23/16
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
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.

Robert
Reply all
Reply to author
Forward
0 new messages