You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2012/10/17 22:28:04 UTC

[jira] [Closed] (CAY-1729) PersistentDescriptor must have predictable property iteration order

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

Andrus Adamchik closed CAY-1729.
--------------------------------

    Resolution: Fixed
    
> 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