Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
(Java) V4 4.5.0
-
None
-
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.