OpenNTF / org.openntf.domino

Open replacement for lotus.domino package in HCL Domino
Apache License 2.0
65 stars 34 forks source link

NotesException: Document is not from this collection #190

Open PatrickKwinten opened 11 months ago

PatrickKwinten commented 11 months ago

Remember, an issue is not the place to ask questions. StackOverflow should be used for questions. We have a Slack channel on OpenNTF Slack workspace for discussions.

Before you open an issue, please check if a similar issue already exists or has been closed.

Please include the following:

I have another unexpected error with ODA and iterating through collections -> "Document is not from this collection". I include more from the message and he code calling. Not sure what I am doing incorrect? 2023-08-03T08:16:34 [WARNING]: lotus.domino.local.DocumentCollection.NgetNextDocument - Document is not from this collection

NotesException: Document is not from this collection

at lotus.domino.local.DocumentCollection.NgetNextDocument(Native Method) at lotus.domino.local.DocumentCollection.getNextDocument(Unknown Source) at org.openntf.domino.impl.DocumentCollection.getNextDocument(DocumentCollection.java:166) at org.openntf.domino.iterators.DocumentCollectionIterator.next(DocumentCollectionIterator.java:67) at org.openntf.domino.iterators.DocumentCollectionIterator.next(DocumentCollectionIterator.java:1)

at org.acme.projectx.dao.AttachmentDominoDAO.getAll(AttachmentDominoDAO.java:288)

DocumentCollection coll = vw.getAllDocumentsByKey(key + "#" + type, true); for(Document doc:coll){ Attachment attachment = loadFromDocument(doc); attachments.add(attachment); }

in loadFromDocument I just read some fields from the document I pass in. nothing more