Bug 519686 - Duplicate entries for the same key in EMaps
Summary: Duplicate entries for the same key in EMaps
Status: NEW
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-14 07:42 EDT by Samuel Leisering CLA
Modified: 2020-12-11 10:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Leisering CLA 2017-07-14 07:42:40 EDT
Sometimes it happens that the same key has more than one entries in an EMap that is stored in a database using CDO. As far as we can tell this is a problem of how cdo stores maps

unfortunately we did not find a way to consistently reproduce this, as this happens very sporadically

The entries are all put into the same way (using EMap.put(...)). Getting the entry  of a key with multiple entries always returns the oldest value, so it is not possible to overwrite entries.

A workaround would be to do something like this before putting the new value, which deletes all entries in turn:

while (emap.containsKey(key)) {
  emap.removeKey(key);
}
Comment 1 Eike Stepper CLA 2017-12-28 01:17:04 EST
Moving all open bugs to 4.7
Comment 2 Eike Stepper CLA 2019-11-08 02:09:28 EST
Moving all unresolved issues to version 4.8-
Comment 3 Eike Stepper CLA 2019-12-13 12:52:26 EST
Moving all unresolved issues to version 4.9
Comment 4 Eike Stepper CLA 2020-12-11 10:40:37 EST
Moving to 4.13.