问题
I have a view with 59 documents. I verified this in the client. In the beforePageLoad event of my XPage I have the following code:
var db:NotesDatabase = session.getDatabase(sessionScope.serverPath,sessionScope.dbName);
var v:NotesView = db.getView(sessionScope.allEntriesView);
viewScope.vwEntryCount = v.getEntryCount();
viewScope.vwCollCount = v.getAllEntries().getCount();
As you can see from the screenshot below, the collection count is correct but the getEntryCount has 3 more documents than I see in the view.
Any ideas?
回答1:
Found the solution.
I unchecked Show response documents in a hierarchy and on the third tab, checked the Don't show empty categories property. Once I did that, both counts came up to 62. The three extra documents were rep conflicts.
来源:https://stackoverflow.com/questions/36165307/xpages-getentrycount-vs-getallentries-getcount