Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing cmis query from 'select * from cmis:documents' to 'select d.* from cmis:documents as d' breaks parsing #13

Open
ghost opened this issue Oct 3, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 3, 2013

Hi not sure if this is in scope or not - but if change the cmis query from

select * from cmis:documents

to something like

select d.* from cmis:documents as d

the knockout parsing seems to break on the results. For example:

[Error] Error: Unable to parse bindings.
Message: TypeError: 'undefined' is not an object (evaluating '$data.properties['cmis:name'].value');
Bindings value: text: $data.properties['cmis:name'].value

I have been checking this out to query aspects (with a correctly formed Alfresco CMIS query) and while the right number of results are returned (I can check results.numItems), something is choking when I try to iterate through the results using the standard search result templates you have in the project

I have done a direct CMIS query to be returned via XML, and the resultant XML string only differs in a timestamp and the actual query string - I can provide an example if you wish - I don't seem to be able to attach text files to this issue

screen shot 20131003001

This screen shot is for a search around cmis:folders - but it occurs for cmis:documents as well

@ghost
Copy link
Author

ghost commented Oct 3, 2013

The issue is with the search results template - need a way to figure out the alias and build into the template - in my above example, where r is the alias

    <div><span data-bind="text: $data.properties['cmis:name'].value"></span>

would have to become

    <div><span data-bind="text: $data.properties['cmis:name'].value"></span>

testing with that modification to the template works as expected.

@agea
Copy link
Owner

agea commented Oct 3, 2013

a way to make it work by not changing the template is to make the query like this:

"select D.cmis:objectId as cmis:objectId, D.cmis:name as cmis:name,..."

@ghost
Copy link
Author

ghost commented Oct 3, 2013

Oh man, I didn't think of that. Sorry. Thought I was on to something :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant