Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The fact that PersistentDescriptor.visitDeclaredProperties() can return a mix of attributes and relationships and generally undefined order has already caused us grief, and will likely be causing some more. Internally properties are stored in a HashMap, so the order depends on the property names, hashing algorithm, and sometimes JDK version (if the hashing algorithm changes, like it did between 1.5 and 1.6)...
A recent manifestation of this problem is described here: http://markmail.org/message/jwlfkgwz6vloavk4 While current algorithm does not have bugs by itself, it creates a great deal of uncertainty that makes reproducing real problems very painful.
Not sure if it makes sense to introduce alpha iteration order of attributes/relationships (does it buy us any extra consistency?), but it is quite clear that at least the order of iteration should be (1) all attributes (2) all relationships. Need to fix it in 3.1 too...