Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore MartenOps.Store and add MartenOps.StoreMany #1158

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

jay-zahiri
Copy link
Contributor

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

Fixes #1162

src/Persistence/Wolverine.Marten/IMartenOp.cs Outdated Show resolved Hide resolved
src/Persistence/Wolverine.Marten/IMartenOp.cs Outdated Show resolved Hide resolved
@davidst
Copy link

davidst commented Dec 10, 2024

I suggest to also add some unit tests to verify the correct behavior.

public recod Foo;

public void StoreManyDocs_test()
{
    var docs = new[] { new Foo(), new Foo() };

    var storeOp = MartenOps.StoreManyDocs<Foo>(docs);

    storeOp.Documents.ShouldBe(docs);
}

@jay-zahiri
Copy link
Contributor Author

I think it's a bit overkill to test the language itself, but you're welcome to add that. Here is a quick update on the demo, if you're unsure.

@davidst
Copy link

davidst commented Dec 10, 2024

I agree that it is overkill to test the language itself, but a test for this has nothing to do with testing the language itself. A bug sneaked into the implementation, therefore a test to verify the correct implementation of the StoreManyDocs would be appropriate.

@jeremydmiller jeremydmiller merged commit 23cc2b6 into JasperFx:main Dec 12, 2024
1 check passed
@jeremydmiller jeremydmiller added this to the 3.5 milestone Dec 13, 2024
@jay-zahiri jay-zahiri deleted the fix-MartenOps.Store branch December 13, 2024 10:00
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.

Store multiple documents with StoreDoc bug
3 participants