Skip to content

Add MartenOps.StoreObjects#1171

Closed
jay-zahiri wants to merge 10 commits intoJasperFx:mainfrom
jay-zahiri:StoreObjects
Closed

Add MartenOps.StoreObjects#1171
jay-zahiri wants to merge 10 commits intoJasperFx:mainfrom
jay-zahiri:StoreObjects

Conversation

@jay-zahiri
Copy link
Copy Markdown
Contributor

@jay-zahiri jay-zahiri commented Dec 17, 2024

Potentially breaking change
If a user is performing any tests on the actual list type, this PR might break it. In this PR StoreManyDocs and StoreObjects inherit the same base class, Documents – which holds the actual list of objects to be stored (IReadOnlyList<object> Documents). I chose this in order to have a single point of source. So StoreManyDocs no longer holds its own list of objects (readonly T[] _documents). Hope I made sense xD

@jay-zahiri jay-zahiri changed the title Add IMartenOp.StoreObject Add MartenOp.StoreObject Dec 17, 2024
@jay-zahiri jay-zahiri changed the title Add MartenOp.StoreObject Add MartenOp.StoreObjects Dec 17, 2024
@jeremydmiller
Copy link
Copy Markdown
Member

@jay-zahiri Can you add a test for this, and I'll pick this up on 3.6? 3.5 today, but 3.6 by the end of this week

@jay-zahiri
Copy link
Copy Markdown
Contributor Author

Will do! I'll probably add them Thursday, swamped til then

@jay-zahiri jay-zahiri changed the title Add MartenOp.StoreObjects Add MartenOps.StoreObjects Dec 19, 2024
jeremydmiller added a commit that referenced this pull request Apr 13, 2026
… effect

Based on PR #1171 by @jay-zahiri. Adds StoreObjects side effect that stores
multiple heterogeneous document types via session.StoreObjects(). Also adds
fluent With() methods to both StoreManyDocs<T> and StoreObjects, and
introduces IDocumentsOp interface. Includes tests and documentation.

Co-Authored-By: Jay Lilja Zahiri <jay-zahiri@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeremydmiller
Copy link
Copy Markdown
Member

Applied this change to main with credit — thank you @jay-zahiri! Added documentation for StoreObjects and the fluent With() API.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants