Nuxeo Java SDK

documents = repository.query(“SELECT * FROM " + docType , “0”, pageIndex, null,

                    null, null, null);

documents.getResultsCount(); if i inquire for Doc Type not fount in my nuxeo engine this is documents.getResultsCount() give me randoum number
please advice Thanks

0 votes

2 answers

555 views

ANSWER



Hello,

Your question is not really clear: If I get is well, you're saying that the number of results is a random number when the document type is not set properly?

I would say to check if the document type exists before sending the query. Then, usually these kind of requests looks like SELECT * FROM Document WHERE ecm:mixinType != 'HiddenInNavigation' AND ecm:isProxy = 0 AND ecm:isVersion = 0 AND ecm:isTrashed = 0 AND ecm:primaryType='<my_custom_type> to avoid listing trashed documents or proxies.

Thx

1 votes



Thanks it worked successfully

0 votes