Getting document properties using nuxeo client

In nuxeo 5.4.2 I was able to get document properties like dc:description by this query:

Documents docs = (Documents) session.newRequest("Document.Query").set(
           "query", "SELECT * FROM Document").execute();

I updated the nuxeo version to 5.5 and thus I had to update nuxeo-client version as well to 5.6 but now when I execute the following statement,

Documents docs = (Documents) session.newRequest("Document.Query").set(
           "query", "SELECT * FROM Document").execute();

I could get dc:title and dc:modified but not other properties like dc:description and dc:language etc.

I studied the nuxeo 5.5 documentation and it says, “the documents in the list are containing only the required top level properties.”

So how can I get get the other document properties via nuxeo client in nuxeo version 5.5?

0 votes

1 answers

4295 views

ANSWER



Try adding

.setHeader(Constants.HEADER_NX_SCHEMAS, "*").

before the .execute(), to request more than the default prefetched properties.

1 votes



Perfect. Thanks Florent; now I am able to get all other fields like nature, coverage, description etc.
04/18/2012