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

Add .ignoreProperty() to csv builder #386

Open
membersound opened this issue Feb 20, 2023 · 4 comments
Open

Add .ignoreProperty() to csv builder #386

membersound opened this issue Feb 20, 2023 · 4 comments
Labels

Comments

@membersound
Copy link

membersound commented Feb 20, 2023

I would love to add fieldnames that should be ignored, like:

mapper.schemaFor(ExternalEntity.class).withHeader().ignoreProperty('id');

I know the @JsonIgnore annotation, but that requires modifying the target class, which is not always possible.
Thus, a configuration setter would be required.

@cowtowncoder
Copy link
Member

While I can see why it might be convenient, conceptually this is bit different from what CsvSchema is meant to define: mapping of column positions to logical name, type.

Still, I can see how some variation would perhaps make sense... would just need to think of how it maps nice to the model. I guess the idea is that definition of ignoral would essentially "hide" column value so that Databind would not see key/value pair at all.

@djay-S
Copy link

djay-S commented May 1, 2023

Hi,

I have raised a PR for this issue:
#418

Can you please review and suggest?

@cowtowncoder cowtowncoder changed the title Add .ignorePropery() to csv builder Add .ignoreProperty() to csv builder May 4, 2023
@cowtowncoder
Copy link
Member

@membersound Can you check out #418 to see if that does what you want? It seems to me that it wouldn't (does something bit different) but I would like to know for sure.

@djay-S
Copy link

djay-S commented Aug 5, 2023

@cowtowncoder Can you have a look at my changes for #418.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants