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

Provide accessors in MongoItemWriter to facilitate extensions #3973

Closed
vincendep opened this issue Aug 12, 2021 · 4 comments
Closed

Provide accessors in MongoItemWriter to facilitate extensions #3973

vincendep opened this issue Aug 12, 2021 · 4 comments

Comments

@vincendep
Copy link

Expected Behavior

Provide accessors for collection and delete properties of MongoItemWriter, so that would be easier extending the class

Current Behavior

MongoItemWriter doesn't provide accessors for collection and delete properties

Context

Currently the MongoItemWriter has an extension point in doWrite method. I encountered some difficulties implementing
a custom "write or update" logic respecting the original contract, due to the fact that some private properties (collection and delete) don't provide an accessor method.

@santfirax
Copy link
Contributor

Hello @vincendep. I'm wondering what exactly is what you need. Do you need a getter for those two fields or would you like to get protected fields for extending the class?.

@santfirax
Copy link
Contributor

Hello @vincendep I have added a PR for this issue. @benas any chance that you can take a look at the PR? #3975

@vincendep
Copy link
Author

vincendep commented Aug 15, 2021

Hello @santfirax. I don't know what is the best way to go, I just found a bit difficult to extend the MongoItemWriter. I thought about getters only because the one for the MongoTemplate is already provided

@tolpp
Copy link

tolpp commented Jul 7, 2022

Hi, I also have added PR ( #4148 ) for this issue. Similar discussion has been made for templete property in #1037, and resolved with PR #447 with commit cae2cab. I did similar changes for this issue.

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