Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1325

EntityUUID - non-unique temp key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • (Java) V4 4.5.0
    • None
    • odata4-ext
    • None

    Description

      We are using ext-proxy and a deep insert which produces incorrect results when having many related entities. The reason for this is that in the class EntityUUID for new entities a tempKey is computed like this

      this.tempKey = (int) (Math.random() * 1000000);

      which for many newly created entities causes collisions so that two new different entities are considered equal by the equals method.

      I think the whole point of the tempKey is to make new entities unique as long as they don't have a real key. Random numbers are not suited for that but you could make tempKey an object and then say

      this.tempKey = new Object();

      which should guarantee that every new entity is unique.

      Attachments

        Activity

          People

            Unassigned Unassigned
            frederik.zimmer Frederik Zimmer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: