cancel
Showing results for 
Search instead for 
Did you mean: 

repository query acts different alfresco 3.1 VS 3.2

malfresco
Champ in-the-making
Champ in-the-making
I have a small client written in C# (.NET 2.0) able to browse alfresco repositories.
Recently I've upgrade alfresco to version 3.2. And I'm not able anymore to get certain information from the repositiory.

One of the main issues is that I don't get the same information from the ResultSetRow

C# pseudo snipets…

myUuid is a valid uuid.


           using RepositoryWebService;



            //the provider creates a valid authenticated (including security headers) service using the information
            //stored into custom someConnection object(e.g. user, ticket, etc);
            RepositoryService service =  WebServicesProvider.createRepositoryService(someConnection);

            Query query =  new Query();
            query.statement = "@sys\\:node-uuid:\"" + myUuid + "\"";
            Store spacesStore = new Store();
            spacesStore.scheme = StoreEnum.workspace;
            spacesStore.address = "SpacesStore";

            QueryResult queryResult = service.query(spacesStore,query,true);
            if (queryResult != null && queryResult.resultSet.rows != null)
            {
                foreach (ResultSetRow row in queryResult.resultSet.rows)
                {
                    //do somenthing to the first(and the only one matching uuid)
                    //here row.columns contains just one NamedValue ("{http://www.alfresco.org/model/content/1.0}path")
                    //using alfresco 3.1 I get here a lot of info (owner, created date etc) with alfresco 3.2 I get just the path….
                }
            }

Is that the correct behavior, not to provide anynore info about the founded item?
Or is a bug iun the new version (3.2)

To mention that queryChilds seams that returns well populated ResultSetRow (but not when the uuid is the id of an user home space!!! in that case it dosen't find any child into it)

Thanks in advance,
M
2 REPLIES 2

tank
Champ in-the-making
Champ in-the-making
I am facing the same problem. I have a Java Application which is using Alfresco via Web Services.
With Version 3.2 Node queries return "path" as the only property, whereas Alfresco 3.1 returns a whole bunch of properties. Because of that behaviour I can´t work with Version 3.2!

Is this a bug which is going to be fixed?

igdolmo
Champ in-the-making
Champ in-the-making
hello,

those properties can be found like this:

Reference r = new Reference(STORE, uuid, null);
        Node[] a = repositoryService.get(new Predicate(new Reference[]{r}, STORE, null));
        for(int i=0;i<a[0].getProperties().length;i++){
            if(a[0].getProperties(i).getName().equalsIgnoreCase("{http://www.alfresco.org/model/content/1.0}content")){
                url=a[0].getProperties(i).getValue();
            }
        }

here i only get the content_url, but yoy have there all properties

bye