[ 
https://issues.apache.org/jira/browse/CAY-1729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrus Adamchik updated CAY-1729:
---------------------------------

    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... 

  was:
The fact that PropertyDescriptor.getDeclaredProperties() 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... 

        Summary: PersistentDescriptor must have predictable property iteration 
order  (was: PropertyDescriptor must have predictable iteration order)
    
> PersistentDescriptor must have predictable property iteration order
> -------------------------------------------------------------------
>
>                 Key: CAY-1729
>                 URL: https://issues.apache.org/jira/browse/CAY-1729
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.1B2, 3.2M1
>
>
> 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... 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to