[ 
https://issues.apache.org/jira/browse/OODT-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13558185#comment-13558185
 ] 

Brian Foster edited comment on OODT-551 at 1/20/13 7:18 AM:
------------------------------------------------------------

i'm still against assuming that Metadata maintains add order... it currently 
does only because that is a side effect of the currently underlying 
implementation... the previous implementation was a hashtable which didn't 
preserve order... the Metadata class is not an ordered collection of metadata 
fields, but more of a Collection of metadata fields... also adding this to 
DataSourceCatalog may work, however how does the LunceneCatalog work for this 
type of functionality?... i think if your particular case requires ordering 
then make a wrapper layer around Metadata in your code which maintains a 
metadata field that is an ordered list of keys... then when you get the 
Metadata back you can read that metadata field to get the ordering and just 
read the keys in that order.
                
      was (Author: bfoster):
    i'm still against assuming that Metadata maintains add order... it 
currently does only because that is a side effect of the currently underlying 
implementation... the previous implementation was a hashtable which didn't 
preserve order... the Metadata class is not an ordered collection of metadata 
fields, but more of a Collection of metadata fields... also adding this to 
DataSourceCatalog may work, however how does the LunceneCatalog work for this 
type of functionality?... i think if your particular case requires ordering 
then make a wrapper layer around Metadata in your code which maintains a 
metadata field that is an ordered list of keys... they when you get the 
Metadata back you can read that metadata field to get the ordering and just 
read the keys in that order.
                  
> DataSourceCatalog implementation does not preserve order of metadata values
> ---------------------------------------------------------------------------
>
>                 Key: OODT-551
>                 URL: https://issues.apache.org/jira/browse/OODT-551
>             Project: OODT
>          Issue Type: Bug
>          Components: file manager
>    Affects Versions: 0.5
>            Reporter: Luca Cinquini
>            Assignee: Luca Cinquini
>             Fix For: 0.6
>
>         Attachments: OODT-551.luca.patch.txt
>
>
> The table that stores the metadata (key, value) pairs for the File Manager 
> database-based implementation has no primary key - as a consequence, values 
> are not guaranteed to be returned in any order, which is a problem for 
> applications that rely on the order of the values (for example, among 
> different metadata keys).

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